Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-04

Non-lcl-designer design question

21 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi,

I'm playing around with a non-lcl-designer to design xib forms. This works quite nice, but there are a lot of issues.

Basic problem is that the 'objects' which are placed on the designer are not TComponent descendants. In fact they aren't even classes but objcclasses.

To circumvent this problem I created a unit with TComponent descendants with the same name as the objcclasses I really want to use. I thought that the Lazarus designer uses the classes which are compiled into the IDE. But this is not everywhere the case. Sometimes the codetools are used. They look up the unit sources and then see completely different classes then the 'fake' TComponent descendants that I used.

I can create a form, edit it, save it, compile it. But when I close it and re-open it again the 'normal' TForm designer is used.

Does anyone see another approach? How could I handle this?

Joost.

Reply by email

Mattias Gaertner
to Joost van der Sluis

Joost van der Sluis hat am 18. April 2012 um 13:45 geschrieben:

Show quoted text 20 lines
Hi, I'm playing around with a non-lcl-designer to design xib forms. This works quite nice, but there are a lot of issues. Basic problem is that the 'objects' which are placed on the designer are not TComponent descendants. In fact they aren't even classes but objcclasses. To circumvent this problem I created a unit with TComponent descendants with the same name as the objcclasses I really want to use. I thought that the Lazarus designer uses the classes which are compiled into the IDE. But this is not everywhere the case. Sometimes the codetools are used. They look up the unit sources and then see completely different classes then the 'fake' TComponent descendants that I used. I can create a form, edit it, save it, compile it. But when I close it and re-open it again the 'normal' TForm designer is used. Does anyone see another approach? How could I handle this?

Sounds similar to KOL.

The designer needs components and that can not be changed easily. Many places only require TPersistent but that does not help with objcclasses. Your approach of creating fake TComponents is probably the easiest way.

I will create a test example so we can check what is possible and what is needed.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120418/93e47a71/attachment.html>

Reply by email

Joost van der Sluis
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
Joost van der Sluis hat am 18. April 2012 um 13:45 geschrieben: > To circumvent this problem I created a unit with TComponent descendants > with the same name as the objcclasses I really want to use. I thought > that the Lazarus designer uses the classes which are compiled into the > IDE. But this is not everywhere the case. Sometimes the codetools are > used. They look up the unit sources and then see completely different > classes then the 'fake' TComponent descendants that I used. > > Does anyone see another approach? How could I handle this? Sounds similar to KOL.

Indeed, somewhat. But I want to use the designer-mediator to make it better looking.

Show quoted text 7 lines
The designer needs components and that can not be changed easily. Many places only require TPersistent but that does not help with objcclasses. Your approach of creating fake TComponents is probably the easiest way. I will create a test example so we can check what is possible and what is needed.

Perfect. I can send you what I have this evening, I don't have my macbook with me right now.

Joost.

Reply by email

Joost van der Sluis
to Joost van der Sluis
Joost van der Sluis wrote 9 lines
On Wed, 2012-04-18 at 14:16 +0200, Mattias Gaertner wrote: > Joost van der Sluis hat am 18. April 2012 um 13:45 > geschrieben: > I will create a test example so we can check what is possible and what > is needed. Perfect. I can send you what I have this evening, I don't have my macbook with me right now.

I would have sent it know, if I hadn't deleted it while removing some old files in between the real code... ;(

I'll have to do over some things...

Joost.

Reply by email

Graeme Geldenhuys
to Joost van der Sluis
Joost van der Sluis wrote
I would have sent it know, if I hadn't deleted it while removing some old files in between the real code... ;(

Every heard of Git? ;-)

You are not alone. I have accidentally delete work in progress too. Now even if I create a simple test app or prototype, it gets placed in a local git repository.

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Reinier Olislagers
to Reimar Grabowski
Reimar Grabowski wrote 5 lines
On Thu, 19 Apr 2012 09:05:45 +0200 Graeme Geldenhuys wrote: > Every heard of Git? ;-) You mean this old, little VCS that had so many problems on windows and was superseded by Bazaar because Bazaar just works? ^^

Yep, git's not that useful if you want to submit patches on windows to Lazarus/FPC svn... perhaps bazaar solved that problem...

Thanks for brightening up my day and bringing up git. Perhaps somebody can start another unicode thread or a documentation dicussion to really heat up things around here...

SCNR,
Reinier

Reply by email

Joost van der Sluis
to Joost van der Sluis: I would have sent it know, if I hadn't deleted it while removing some old files in…
Joost van der Sluis wrote 15 lines
On Wed, 2012-04-18 at 14:42 +0200, Joost van der Sluis wrote: > On Wed, 2012-04-18 at 14:16 +0200, Mattias Gaertner wrote: > > > Joost van der Sluis hat am 18. April 2012 um 13:45 > > geschrieben: > > I will create a test example so we can check what is possible and what > > is needed. > > Perfect. I can send you what I have this evening, I don't have my > macbook with me right now. I would have sent it know, if I hadn't deleted it while removing some old files in between the real code... ;( I'll have to do over some things...

Ok, restored. See attachment.

It's just a modification of the designnonlcl example. I did not even bother to rename it.

In principle: install the package, and create a new 'ios application'. You can add components from the MyWidgetSet tab. Then there's some trickery: you have to run 'Start my tool' from the tools menu while the appdelegate_iphone designer is active. This is to create the .xib file. Then you can build the application and run it in the iPhone simulator.

That's theory. Now the problems:

1: The package depends on the IDE package, so it is impossible to install. Just remove the IDE dependency, install the package, and add the IDE dependency again. This dependency is to be able to set the 'aftercompile' project-option. And to be able to obtain the package-directory, because the .xib template is located there. (I'm sure Mattias can help me with these issues)

2: All settings are for the 5.1 sdk on OS/X Lion with the latest Xcode. Note that the location of Xcode has changed in this version. So maybe the aftercompile.sh script has to be altered. And the 'other compiler options'. We can make this more user-friendly later. (Revive the iphonelazext and use that)

3: It seems that DoNewEditorfile does not save the file if it is really opened in an editor. This means that the info.plist and appdelegateu.pas files are not written to disk. Open the project-inspector, open these files and save them to disk. Also something that Mattias can help with. (It would also be nice to actually use Infp.plist, with a capital. And is it possible to save appdelegate_iphone.pas quietly?)

4: The real issue: save the project, restart lazarus and open it again. Now it won't work anymore...

5: There are a lot more, but I think these are the most important to get you going...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: designnonlcl.tgz
Type: application/x-compressed-tar
Size: 12568 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120419/45651411/attachment.bin>

Reply by email

Sven Barth
to Reinier Olislagers: Yep, git's not that useful if you want to submit patches on windows to Lazarus/FPC svn...…
Reinier Olislagers wrote 13 lines
On 19-4-2012 14:51, Reimar Grabowski wrote: > On Thu, 19 Apr 2012 09:05:45 +0200 > Graeme Geldenhuys wrote: > >> Every heard of Git? ;-) > You mean this old, little VCS that had so many problems on windows and was superseded by Bazaar because Bazaar just works? ^^ Yep, git's not that useful if you want to submit patches on windows to Lazarus/FPC svn... perhaps bazaar solved that problem... Thanks for brightening up my day and bringing up git. Perhaps somebody can start another unicode thread or a documentation dicussion to really heat up things around here...

The Git discussions don't usually get as heated up as unicode or documentation discussions ^^

Regards,
Sven

Reply by email

Joost van der Sluis
to Sven Barth
Sven Barth wrote 17 lines
On 19.04.2012 15:12, Reinier Olislagers wrote: > On 19-4-2012 14:51, Reimar Grabowski wrote: >> On Thu, 19 Apr 2012 09:05:45 +0200 >> Graeme Geldenhuys wrote: >> >>> Every heard of Git? ;-) >> You mean this old, little VCS that had so many problems on windows and was superseded by Bazaar because Bazaar just works? ^^ > > Yep, git's not that useful if you want to submit patches on windows to > Lazarus/FPC svn... perhaps bazaar solved that problem... > > Thanks for brightening up my day and bringing up git. Perhaps somebody > can start another unicode thread or a documentation dicussion to really > heat up things around here... The Git discussions don't usually get as heated up as unicode or documentation discussions ^^

You think?

Maybe that's because the people that normally join the git discussion have grown older and know that they better could not react anymore. ;)

Maybe you should have a look in the archive for some other git-discussions. (Or better not, and just continue what you were doing before this distraction. For example: have a look at the nonlcldesigner for iOS)

Joost

Reply by email

Joost van der Sluis
to Joost van der Sluis: Ok, restored. See attachment. It's just a modification of the designnonlcl example. I did…
Joost van der Sluis wrote 6 lines
On Wed, 2012-04-18 at 20:39 +0200, Joost van der Sluis wrote: In principle: install the package, and create a new 'ios application'. You can add components from the MyWidgetSet tab. Then there's some trickery: you have to run 'Start my tool' from the tools menu while the appdelegate_iphone designer is active. This is to create the .xib file. Then you can build the application and run it in the iPhone simulator.

6: Is there a way to intercept when a unit is saved? So that at the same time the unit is saved, the .xib is created?

Joost.

Reply by email

Sven Barth
to Joost van der Sluis: You think? Maybe that's because the people that normally join the git discussion have…
Joost van der Sluis wrote 21 lines
On Thu, 2012-04-19 at 17:59 +0200, Sven Barth wrote: > On 19.04.2012 15:12, Reinier Olislagers wrote: >> On 19-4-2012 14:51, Reimar Grabowski wrote: >>> On Thu, 19 Apr 2012 09:05:45 +0200 >>> Graeme Geldenhuys wrote: >>> >>>> Every heard of Git? ;-) >>> You mean this old, little VCS that had so many problems on windows and was superseded by Bazaar because Bazaar just works? ^^ >> >> Yep, git's not that useful if you want to submit patches on windows to >> Lazarus/FPC svn... perhaps bazaar solved that problem... >> >> Thanks for brightening up my day and bringing up git. Perhaps somebody >> can start another unicode thread or a documentation dicussion to really >> heat up things around here... > > The Git discussions don't usually get as heated up as unicode or > documentation discussions ^^ You think?

Yes, I do. At least I haven't seen such big ones about Git vs. SVN on the lists as I've seen for the other two topics.

Show quoted text 7 lines
Maybe that's because the people that normally join the git discussion have grown older and know that they better could not react anymore. ;) Maybe you should have a look in the archive for some other git-discussions. (Or better not, and just continue what you were doing before this distraction. For example: have a look at the nonlcldesigner for iOS)

While I'm very interested in the non-LCL-designer (though I haven't used it yet, because of missing time), I don't think that I'll be able to help you with iOS/Objective-C related topics:
1. I don't have a Mac and thus I'll have big problems (cross-)compiling code
2. I'm not that much interested in iOS-development

Nevertheless I'll follow your experience with the non-LCL-designer closely, as others (like me) might/will benefit from your findings in the future.

Regards,
Sven

Reply by email

Graeme Geldenhuys
to Reimar Grabowski: On Thu, 19 Apr 2012 09:05:45 +0200 You mean this old, little VCS that had so many…
Reimar Grabowski wrote
You mean this old, little VCS that had so many problems on windows and was superseded by Bazaar because Bazaar just works? ^^

I love it when people here talk about things they know nothing about....

Re-reading my original response, maybe 'git' could have meant the slang British English term meaning 'idiot' or 'fool' (which could have been a humorous response to Joost). There are a few more harsher meanings of the word too [which seem to apply nicely to you].

http://www.urbandictionary.com/define.php?term=git

So I'll just keep you guessing as to which meaning I really meant.

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Sven Barth
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
On 19 April 2012 18:34, Sven Barth wrote: > Yes, I do. At least I haven't seen such big ones about Git vs. SVN on the > lists as I've seen for the other two topics. You missed out on the good old days. :)

I DID read those (I read the archives far longer than I participate in them ;) ), but they got less about this topic.

Regards,
Sven

Reply by email

Reimar Grabowski
to Graeme Geldenhuys: I love it when people here talk about things they know nothing about.... Re-reading my…
I love it when people here talk about things they know nothing about....

[...]

There are a few more harsher meanings of the word too [which seem to apply nicely to you]. So I'll just keep you guessing as to which meaning I really meant.

I am always amazed how eloquent, professional, illuminating and unboastful your messages are. You are my hero.

Love and kisses
R.

Reply by email

Joost van der Sluis
to Marco van de Voort
Marco van de Voort wrote 8 lines
On Thu, Apr 19, 2012 at 05:59:20PM +0200, Sven Barth wrote: > > can start another unicode thread or a documentation dicussion to really > > heat up things around here... > > The Git discussions don't usually get as heated up as unicode or > documentation discussions ^^ Maybe that's because the latter two are relevant.

I can see you've never been forced to use git. Or else you would know that problems with documentation and unicode will slow you down. Just as using git does. So they are all three relevant.

But for now, can we talk about non-lcl-designers and iOS again?

Joost.

Reply by email

Marco van de Voort
to Joost van der Sluis
Joost van der Sluis wrote 5 lines
> > documentation discussions ^^ > > Maybe that's because the latter two are relevant. I can see you've never been forced to use git.

Relevant within the projects related to this maillist, I should have said.

Or else you would know that problems with documentation and unicode will slow you down.

I would say it is rather the various stalemates relating to them. (default string type, definitive adoption of helpformats etc). That more than the problems themselves.

Just as using git does. So they are all three relevant.

Nope. Doesn't hold me back at all, except the discussions :-)

But for now, can we talk about non-lcl-designers and iOS again?

The first is interesting, and I already came to terms I'm apparently the only one in the world not remotely interested in the second (or its robotic cousin)

Reply by email

Sven Barth
to Marco van de Voort
"Marco van de Voort" wrote
> But for now, can we talk about non-lcl-designers and iOS again? The first is interesting, and I already came to terms I'm apparently the only one in the world not remotely interested in the second (or its

robotic

cousin)

I'm not interested in iOS development either, but I AM interested in Android one. That said a non-LCL-designer for the jvm-android port would be interesting...

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120420/542677fc/attachment.html>

Reply by email