Archives for LCL

Dialog 2

Posted by ALB42 on 26. Mai 2011No Comments

This days i didn’t have much time for fpc/lazarus.. too much work.

But today i found a little bit time to complete the Filedialoges, (Save dialog, select directory, multiselect, pattern) and also started with  custom dialoges with test and buttons for use with Showmessage, MessageBox MessageDlg.. This is a little bit strange there is a function called messageBox in TWidget but this function seems to be never called, at least not with this functions, but a function prompt User exists and is called for show this message box… a really BAD and strange thing: MUI Does not repaint the window as long the dialog is shown.. Simple dialog

Give me dialogues!

Posted by ALB42 on 19. Mai 2011No Comments

I started to implement Dialogs, of course starting with file dialog which is the most important, the most time I needed to port the ASL.library header and workbench.library header for fpc, but then its really very simple.
Requester and Application properties
I noticed that the Mui application has some fields for author, version, copyright and so on. Now I set some of these Values from the resource set in Lazarusproject version informations, see screenshot, already you can see some of them in the exchange window. The rest will be only visible in the Abort requester. I’m not completely sure how to implement such things… perhaps as a own requester type. I will think about it, but THIS is really not urgent, first try to get the most important things running 😉

Menu Events

Posted by ALB42 on 18. Mai 2011No Comments

The Menu event (click) is now working, it was more difficult than I thought, but the problem was not on the MUI side but on the LCL side… it was difficult to find out how to fire the event in MenuItem, because its not done via an Event (like mouseclicked on Button or so) but by and direct Command (TMenuItem.Click).

Sadly i don’t have much time this days so the progress is very slow, perhaps at WE i have more time for it.

Serve the menu please

Posted by ALB42 on 16. Mai 2011No Comments

Now its time to implement the Menus. The handling is a little bit strange… in MUI… hmm the difference between Menu.mui and Menuitem.mui seems to be only the Event and some more options for Item… but for the menu in prinbiple can always use MenuItem.mui. hmm should check more carefully tomorrow.

Finally i got it to work in a first very crude way… the events still not working, ok this should not be a big issue, after Menus are finished i should try Dialogs and make some cleanups then in principle could release a first alpha version with lcl support.

Like always a little screenshot of todays work 😉

top: Menueditor in lazarus ubuntu

LCL Menus under aros

bottom: Aros with compiled program and opened menu

TMemo problem, Stream problem

Posted by ALB42 on 15. Mai 2011No Comments

The problems with Streams in freepascal is solved, the crash was produced by the BPTR problem described before. The reason for failure was different, the arguments contains quotes and the current routine for get the arguments did not handle quotes. After include a routine for handle quotes it works fine, so now the fpcres is also usable. This means lazarus created projects can be compiled directly with fpc on AROS. I made a Video to show how it works: Create a simple AROS program

The TMemo crash problem  at close of program also solve. It was just an inherited problem in TWSCustomEdit

Events, TextEditor, Combobox

Posted by ALB42 on 9. Mai 2011One Comment

the ComboBox at MUI is rather strange it allows you to change the Names of Entries.. they are also updated on the fly when you open the combobox… but the Text directly on the (closed) Combobox is not updated :O there are still the old names…. (see Picture)

MUI ComboBox bug?

even when change the items… at this position ALWAYS the old names appear.. hmm where MUI keep them? seems they made a copy of it which i cant change? Weird!

But the rest was rather successful.. the events already working rather nicely… also included a nice Memo 🙂 hmm I should think about the use this to make a Text editor for myself (for Pascal coding) in AROS hmm SynEdit would be VERY nice.. i should check what decencies Synedit has.

FPC, MUI, LCL and other nice things

Posted by ALB42 on 8. Mai 2011No Comments

 An Update for FPC is published at AROS exec, in princple the first really working. Already included now some aros/amiga units like exec, amigados, agraphics (instead of graphics which exists in lcl), intuition gadtoos and of course MUI. Also I put in the MUI example program (see yesterday) into the examples folder.

Last Version of fpc for AROS

Today I started to implement the MUI classes for LCL. For this purpose I wrote a wrapper unit, which makes the classes existing in the MUI library directly accessible, like any other Pascal class. The first results look already very promising… in fact the handling of MUI and LCL is not that different especially the events are much easier to handle than gadtools. A little bit bad on the first view was, that MUI does not allow own position of Components, only automatic positions available (group concept very close to GTK) but by setting and Layout Hook and add and Left, Top, Width and Height to every Object I was able to disable this behaviour… I know this behaviour is very nice, special for scaled GUIs, but sadly LCL does not support such behaviour, as fas as I know. After some work I got

LCL MUI Test

which looks already very nice, at least much better than gadtools. Events also already working very nicely… just some class fields are a little bit strange… the documentation of MUI is hmmm how to say.. not very nice to use.