GTKMaxGUI

BlitzMax Forums/Brucey's Modules/GTKMaxGUI

SebHoll(Posted 2008) [#1]
Hi Brucey,

Where's the best place to download Bah.GTKMaxGUI from? Is it still from your "Brucey's Modules" web-page or is it now on Google Code? I did check but the one on your web-page was updated last April, and didn't know whether this was the latest version...

Cheers


Seb


Brucey(Posted 2008) [#2]
The latest is from the old modules webpage.
It's also based on the standard MaxGUI module layouts. Until the new layout becomes standard I can't really change it.


SebHoll(Posted 2008) [#3]
Hey Brucey,

Until the new layout becomes standard I can't really change it.

Should hopefully be released sometime this weekend... The new MaxGUI.MaxGUI is available via SVN.

Just thought I'd post that I found a bug when resizing GTKMaxGUI windows on Ubuntu...

Resizing using the left, right and bottom borders are fine, but when the window is resized using the top border (i.e. to make it taller, while changing the y-position accordingly), the window seems to grow mostly at the bottom and stays at it's original x-y position - looks a bit weird...

Also another bug (visible in MaxIDE) involves opening one of the dialog boxes (e.g. by pressing Ctrl+F with a source file open), and results in a window being shown that can't be more than 15 pixels square and because of the small size, non of the controls are visible - it's near impossible to re-enable the IDE...

I've noticed this in my own MaxGUI programs too, so I don't think these are specific to the IDE.

Cheers


Seb


SebHoll(Posted 2008) [#4]
Also, I can't get any of the HTMLViews to show anything... This is visible both in the IDE and the CreateHTMLView example. All these bugs means I've got to start using FLTK again :-(.


Mark Tiffany(Posted 2008) [#5]
It's worth noting in this thread (for those trying to get GTKMaxGUI working with the new MaxGUI.MaxGUI module, that you will need to amend the file gtkcommon.bmx to Import MaxGUI.MaxGUI instead of BRL.Maxgui.


Mark Tiffany(Posted 2008) [#6]
Bug in GTK implementation & ExtractPixmapIconFromPixmap:

In gtkgadget.bmx, go to the IconStrip gadget type. Remove the pixmap Field.

There is no need for this as it exists in the TGadget type that this inherits from. Removing this means that the new ExtractPixmapIconFromPixmap now works.


SebHoll(Posted 2008) [#7]
Another bug:

SetGadgetHotKey() doesn't handle the removal of hotkeys by passing 0 as the paramater for hotkey/modifier.


Mark Tiffany(Posted 2008) [#8]
Another bug in either GTK or PUB.FREEPROCESS:
Import bah.gtkmaxgui
Import bah.gtkwebgtkhtml
Import bah.gtkwebmozilla
win=CreateWindow("Test",1,1,100,100)
process:TProcess = CreateProcess("/home/mark/BlitzMax/bin/bcc",HIDECONSOLE)

On Ubuntu 7.10 this locks up.

I seem to recall that 7.10 introduced the tickless kernel, I guess this could be it?

The weird thing is though, FLTK works fine. CreateProcess on it's own works fine. It's the combination with GTK that causes problems...


Mark Tiffany(Posted 2008) [#9]
Even simpler - this locks up:
Import bah.gtkmaxgui
win=CreateWindow("Test",1,1,100,100)
process:TProcess = CreateProcess("/home/mark/BlitzMax/bin/bcc",HIDECONSOLE)


But changing the Import to Maxgui.drivers doesn't.

I have found a means of getting this to work on my Linux box by amending TGTKGuiSystemDriver in gtkgui.bmx. I simply amend the call to gtk_main_iteration_do in Wait() to use param=False (like Poll) instead of True. Presumably this kind of breaks expected EventWait behaviour, but does at least point towards the problem, and possibly provide a proper fix. I'm thinking that if calling it with True is the true problem, then a simulated blocking process could be coded in this function using max code?

However, even after doing this, MaxIDE CE edition (on my linux box) *still* hangs! AAARRRGGHHHH!!!! Bloody linux.


skidracer(Posted 2008) [#10]
That one could be due to freeprocess trying to flush or close an io pipe.

There was an OSX fix for freeprocess a while ago that may be worth looking into for linux. I blamed 4.x pthreading when FLTK was displaying the same behavior and decided gcc3.3 was a winner.

Are you using 3.3 or 4.x toolchain?


Mark Tiffany(Posted 2008) [#11]
I'm on Ubuntu 7.10, which is 4.x, but I think I installed 3.3, rather than symlinking gcc4. I just shutdown the linux box & off to bed now so can't check.

It is on a call to fdProcess that it hangs, so agree freeprocess is looking more like the culprit now though...and if it's causing the above problem, it may yet be the cause of my (and others) general gtk / maxide woes on linux...


SebHoll(Posted 2008) [#12]
Hey Brucey,

Has your Linux box floated it's way over here yet? ;-)


Brucey(Posted 2008) [#13]
I suppose I should allocate some resources to GTK now that 1.30 is current :-p


Mark Tiffany(Posted 2008) [#14]
yay!

Feel free to throw any tweaks / fixes my way to try out as a guinea pig - keen to get maxgui & gtk & ce ide working again on my linux box...(although am away for the next few days)


SebHoll(Posted 2008) [#15]
I suppose I should allocate some resources to GTK now that 1.30 is current :-p

Whoooo! BlitzMax 1.30 is out the door, Brucey wants to resume his work on GTKMaxGUI. It's like all of my Christmases have come at once!!! :-P

So where will you be starting? Bug-fixes perhaps?

Also, I may have a solution to the Pub.FreeProcess problem *Dev Team Link*. I could never reproduce this bug myself, so I can't test, but it may fix this problem too.


Htbaa(Posted 2008) [#16]
Found a bug, or at least unexpected behavior.

When creating radio buttons with CreateButton and grouping these in a panel (this is what I tried) it seems that it always selects the first available radio button. With Windows driver it doesn't select radio buttons at default.

In my situation I have a panel described as "Rendering mode". It contains 2 radio buttons: Software and OpenGL. Although I preselect the OpenGL button as the selected one with SetButtonState(render_opengl, True) the render_software radio button is being selected because it was created first. So when I get to my main loop checking out the EventSource() of EVENT_GADGETACTION it executes the code of the render_software radio button. Which changes the rendering mode in my configuration. After that it selects the render_opengl radio button, but it doesn't execute it's code.

So the application launcher is telling the user that OpenGL will be used (since it's selected), but it was actually told to use Software rendering.

I fixed this with calling SetButtonState render_software, False and SetButtonState render_opengl, False right after the buttons were created.

Wouldn't it be best if the GTK driver would behave like the other drivers? I didn't have this problem on Windows or with FLTK (I have other problems with that one :-)).


Brucey(Posted 2008) [#17]
Sorry for the delays... I've *finally* got myself a new Linux box (Asustek V3-P5G33 / 2.66ghz Core2Quad / 4gig / 320gig HDD), and currently compiling up the modules...
Goodness it's quick :-)

I'd like to take this opportunity to thank everyone that has donated via PayPal. I can now get some proper developing done!


SebHoll(Posted 2008) [#18]
and currently compiling up the modules...

Cool, make sure you are using the very latest SVN MaxGUI commits though (the last update was about 20 mins ago!).

Goodness it's quick :-)

Tell me about it - the gcc compiler on Linux is lightning fast.

Good-luck!


Brucey(Posted 2008) [#19]
Not that it's working properly mind you...

Some things run, some things break - at the same place every time, with a seg-fault.
I might try rolling back to 1.24 and see where I get with that one... part of me thinks it's a gcc 4.x issue, but I was using 4.x before without problems... something for this evening then... ho hum :-p


Brucey(Posted 2008) [#20]
Bugger. Looks like I'm back on gcc3.3 til I can work out what's gone wrong with gcc4.x. Ho hum :-p

Geez... what a lot of issues here... *sigh*


Brucey(Posted 2008) [#21]
LookupGUIFont ?


Brucey(Posted 2008) [#22]
nm... I guess LoadFont needs to fallback on *something* if say, Lucida, isn't on the system...


SebHoll(Posted 2008) [#23]
nm... I guess LoadFont needs to fallback on *something* if say, Lucida, isn't on the system...

Yep, LoadGuiFont() should return the most suitable font even if the given name isn't available, to mimic the behaviour on Windows or OS X. FLTK just uses Helvetica if it can't match one, iirc.

Regarding LookupGuiFont(), check out the FLTKMaxGUI source (TFLTKGUIDriver.LibraryFont()) or the MaxGUI docs for more info. If GTK has the capability, it is better if the GUI driver overrides the LibraryFont() method, as otherwise hard-coded font names (specified in MaxGUI.MaxGUI) are returned for each platform.

Cheers


Brucey(Posted 2008) [#24]
...resizing using the top border...the window seems to grow mostly at the bottom...

Trying this on Ubuntu 8.04, seems to work as expected - the window gets taller from the top.


Brucey(Posted 2008) [#25]
Problems with locating libgtmembedmoz.so ?

Try installing the package "libxul0d"


Problems getting any help to show?

You can either set the environment variable : MOZ_DIST_BIN
to the path where you have a mozilla install (ie. firefox/mozilla/seamonkey/xulrunner), or hard-code it into gtkwebmozilla.bmx

I'm sure there must be an easier way than this...

:-/


Brucey(Posted 2008) [#26]
Another bug in either GTK or PUB.FREEPROCESS...

It's not locking up here - on Ubuntu 8.04.


Brucey(Posted 2008) [#27]
Am going to be committing the gtk stuff into my Maxmods SVN soon, which will keep things better organized.

FYI.

:-p


Brucey(Posted 2008) [#28]
Righty... checked the three modules in now.

MOZ_DIST_BIN, if not set, will now try to determine where is a good path, by testing some standard paths. This should improve the chances of it finding a valid dist folder.
This *doesn't* solve the libgtkembedmoz.so location issue. Perhaps we need some kind of lazy loading of the shard object instead of the link being compiled in - I haven't done this on Linux before, so I'll have to experiment a bit with it first.
If we went in that direction, it means the app could still compile/load, except that the htmlview wouldn't do much. Perhaps in its place have a message in the space saying that the shared object couldn't be loaded...

Any thoughts on that?

It's nice to have the IDE running in GTK again... goodbye sickly, stripey grey... :-p


Brucey(Posted 2008) [#29]
I see that the "Loading..." window is not in front when the IDE loads... not sure what we'll do about that.

I also notice that the age-old bug with the splitter dragging in the IDE with GTK is no longer an issue? Did I fix that? did GTK fix something? Was the IDE tweaked? I honestly can't remember :-p

@Htbaa, I'll see if I can't fix your radio group problem. Might you have a small example of it not working as you expect? (I work better with examples :-)


SebHoll(Posted 2008) [#30]
I see that the "Loading..." window is not in front when the IDE loads... not sure what we'll do about that.

If it's any help, this was originally a problem with both the Cocoa and FLTK drivers and was because the hidden MaxIDE main window was being shown when the settings are loaded, i.e. when the window was maximized or resized. Easy enough to sort out on these two platforms... Not sure about GTK though...


Brucey(Posted 2008) [#31]
Okay... Fixed the splash stuff... appears to work as the others now. (see rev 359).


Brucey(Posted 2008) [#32]
Any other outstanding issues that anyone knows of?


skidracer(Posted 2008) [#33]
I also notice that the age-old bug with the splitter dragging in the IDE with GTK is no longer an issue? Did I fix that? did GTK fix something? Was the IDE tweaked? I honestly can't remember :-p


I remember you fixing that one and if I didn't say so at the time, well done sir!

It was just before perhaps you became enchanted by that 17 tonne wxbehemoth api...


Mark Tiffany(Posted 2008) [#34]
It's not locking up here - on Ubuntu 8.04.

Some of Seb's changes seemed to improve things in that area. Will fire up linux this weekend and see what the current state of play with latest gtk is. Thanks Brucey.


Brucey(Posted 2008) [#35]
@Htbaa, I think I've fixed the radio button problem, if you want to give it a go.
The changes are currently in the maxmods SVN.

I note also that when SetButtonState is called an event is raised, which probably shouldn't happen.
Looking at the wxWidgets code, I see that they disable "clicked" events on all buttons belonging to the group, for the duration of the call the change state. I imagine I'll have to do something similar at some point.
...which means I'll need to track radio buttons for the parent in order to somehow disconnect the events, and reconnect them afterwards... oh Well :-p


Htbaa(Posted 2008) [#36]
I will Brucey, but is the gtk+ mod at http://brucey.net/programming/blitz/index.php the most recent one? I can't find some other source so...

Edit: I see it's in the SVN repository (http://maxmods.googlecode.com/svn/). It's not mentioned on your Google Code page though. I'll try it later today, I hope :-).


Htbaa(Posted 2008) [#37]
I just gave it a go. Nothing seems to have changed. The behavior is still the same.

I removed the previous installed modules, put in the ones from the trunk and did a recompile. But it makes no difference.

Something else changed as well. To minimize file size I only include the required modules, thus I did this:
Framework MaxGUI.Drivers
Import BRL.EventQueue
Import PUB.FreeProcess
?Linux
Import bah.gtkmaxgui
?


But with the latest build this makes it use FLTK as the default driver. This used to work though.


SebHoll(Posted 2008) [#38]
Try the following:

Framework BRL.EventQueue
Import PUB.FreeProcess
?Not Linux
Import MaxGUI.Drivers
?Linux
Import bah.gtkmaxgui
?



Brucey(Posted 2008) [#39]
Nothing seems to have changed. The behavior is still the same.

Can you replicate the problem in a small example?

The createbutton.bmx test shows the creation of three radio buttons, with the second one being set as active.


SebHoll(Posted 2008) [#40]
Eeeek... Just checked-out your maxmods SVN repo and it won't build libxml.mod because of a dependancy on wx.wxzipoutputstream...

Do I need to checkout the entire of wxMax in order to build it?


Brucey(Posted 2008) [#41]
you what?


Brucey(Posted 2008) [#42]
It doesn't have a dependency to that where I am... perhaps you are looking at a different module?

It ain't libxml.mod :-)


SebHoll(Posted 2008) [#43]
Sorry, it wasn't libxml.mod, but instead xlwriter:

...
Compiling:SAX.c
Compiling:entities.c
Compiling:encoding.c
Compiling:error.c
Compiling:parserInternals.c
Compiling:parser.c
Compiling:tree.c
Compiling:hash.c
Compiling:list.c
Compiling:xmlIO.c
Compiling:xmlmemory.c
Compiling:uri.c
Compiling:valid.c
Compiling:xlink.c
Compiling:HTMLparser.c
Compiling:HTMLtree.c
Compiling:debugXML.c
Compiling:xpath.c
Compiling:xpointer.c
Compiling:xinclude.c
Compiling:nanohttp.c
Compiling:nanoftp.c
Compiling:catalog.c
Compiling:globals.c
Compiling:threads.c
Compiling:c14n.c
Compiling:xmlstring.c
Compiling:xmlregexp.c
Compiling:xmlschemas.c
Compiling:xmlschemastypes.c
Compiling:xmlunicode.c
Compiling:xmlreader.c
Compiling:relaxng.c
Compiling:dict.c
Compiling:SAX2.c
Compiling:xmlwriter.c
Compiling:legacy.c
Compiling:chvalid.c
Compiling:pattern.c
Compiling:xmlsave.c
Compiling:schematron.c
Compiling:libxml_base.bmx
flat assembler version 1.64
3 passes, 11139 bytes.
Compiling:libxml.bmx
flat assembler version 1.64
4 passes, 0.1 seconds, 290453 bytes.
Archiving:libxml.debug.linux.x86.a
ar: creating /home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/libxml.mod/libxml.debug.linux.x86.a
Compiling:xlwriter.bmx
Compile Error: Can't find interface for module 'wx.wxzipoutputstream'
[/home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/xlwriter.mod/xlwriter.bmx;42;1]
Build Error: failed to compile /home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/xlwriter.mod/xlwriter.bmx
Process complete



Brucey(Posted 2008) [#44]
You might want to remove that one then, unless you want to try your hand at generating spreadsheets from code?

Remember, instead of checking out everything from a repository, it's sometimes easier to get only the bits you need ;-)

Especially considering how much is in the maxmods repository at the moment.


SebHoll(Posted 2008) [#45]
You might want to remove that one then, unless you want to try your hand at generating spreadsheets from code?

Have done - cheers!

Just having a quick scan over the code now. Things that immediately stand out at me that have changed in MaxGUI that you may want to add:

> SetSensitivity() and GetSensitivity() methods for Gadget.
> GetTooltip() method for Gadget.
> Class() methods to return gadget constant for new GadgetClass() function.
> SetPixmap() support for menus?
> LoadFontWithDouble() method for TMaxGUIDriver (if GTK supports it).
> The SetButtonPixmap() function is probably redundant now.

Edit: Does this mean anything to you, either?

Compiling:mysqlhelper.cpp
/home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/dbmysql.mod/mysqlhelper.cpp:6:23: my_global.h: No such file or directory
/home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/dbmysql.mod/mysqlhelper.cpp:8:19: mysql.h: No such file or directory



Brucey(Posted 2008) [#46]
Edit: Does this mean anything to you, either?

It means you haven't got the libmysqlclient dev package installed, so the headers aren't there, which that module needs for compilation.

Thanks for the list. I'll have a rummage through and see what needs adding where.


Htbaa(Posted 2008) [#47]
Hi Brucey,

I took a look at createbutton.bmx and if you select a radio button it prints EVENT_GADGETACTION once. When you change it again (and again) it prints EVENT_GADGETACTION twice. Is this supposed to happen? I don't think so. Perhaps that's where it's going wrong?


Brucey(Posted 2008) [#48]
I can fix that, it's adding a single line of code.

I wasn't sure if the selection was meant to raise an action on the radiobutton that had been de-selected.
But I'll remove that functionality if it's incorrect.


Brucey(Posted 2008) [#49]
> SetSensitivity() and GetSensitivity() methods for Gadget. - kind of done.
> GetTooltip() method for Gadget. - done
> Class() methods to return gadget constant for new GadgetClass() function. - done
> SetPixmap() support for menus? - done
> LoadFontWithDouble() method for TMaxGUIDriver (if GTK supports it). - probably done

Modified number of action emits when radio button changed.

...for now.


SebHoll(Posted 2008) [#50]
> SetSensitivity() and GetSensitivity() methods for Gadget. - kind of done.
> GetTooltip() method for Gadget. - done
> Class() methods to return gadget constant for new GadgetClass() function. - done
> SetPixmap() support for menus? - done
> LoadFontWithDouble() method for TMaxGUIDriver (if GTK supports it). - probably done

Modified number of action emits when radio button changed.

...for now.

Fantastic!

Oh that was something, I spotted in the code that you overrode the TGadget.SetRect() method in order to clamp the x and y positions to positive values. Is there a GTK reason why you've done this? It's just that it will break things like slider panels that rely on moving internal panels to negative coordinates. Although I haven't tested, I'd of thought this would be visible in the CE IDE Keyboard Shortcuts options tab.


SebHoll(Posted 2008) [#51]
Oops, line 78 of mod/bah.mod/bass_fx.mod/common.bmx is throwing compile errors also on Linux...

Compiling:glue.cpp
Compiling:common.bmx
Compile Error: 'End Extern' without matching 'Extern'
[/home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/bass_fx.mod/common.bmx;78;1]
Build Error: failed to compile /home/sebholl/Desktop/BlitzMax SVN/mod/bah.mod/bass_fx.mod/common.bmx
Process complete



Brucey(Posted 2008) [#52]
Thanks... I forgot to check that back in :-)

Lack of Linux testing time is beginning to show through the cracks...

Fixed.


SebHoll(Posted 2008) [#53]
Cheers! I'm getting there slowly...

What packages do I need for GTKMaxGUI and the HTMLRenderer engines, again? I've got libgtkdev-2.0 and libgtkhtml-3.8 (I think I've remembered those correctly)...

I'm getting a tonne of errors when running maxide.bmx with Import Bah.GTKWebGTKHTML (nothing is shown in the HTMLView, just a white space):



And when importing Bah.GTKWebMozilla, I get...

Building maxide
Compiling:maxide.bmx
flat assembler  version 1.64
5 passes, 0.2 seconds, 297984 bytes.
Linking:maxide
/usr/bin/ld: cannot find -lgtkembedmoz
collect2: ld returned 1 exit status
Build Error: Failed to link /home/sebholl/Desktop/BlitzMax SVN/src/maxide/maxide
Process complete
:-(


Brucey(Posted 2008) [#54]
For mozilla, you can try the libxul0d package. It's the one that comes with gtkmozembed.


Brucey(Posted 2008) [#55]
Ahh.. the GTK-WARNING messages... looks like a recent change of mine...

And there seems to be a problem with the menu shortcuts... joy.


SebHoll(Posted 2008) [#56]
For mozilla, you can try the libxul0d package. It's the one that comes with gtkmozembed.

Yep, that fixed the compile errors for BaH.GTKWebMozilla but I'm still getting the GTK Warning messages... :-(


SebHoll(Posted 2008) [#57]
OK, I just checked out again and the warning messages seem to have gone. Yay!

Found a few more bugs to keep you busy...

> Disabling menus doesn't appear to work.
> Tabs don't look right for some reason (see IDE options). I think this is because of the way GTK handles tabs which is more automated than the MaxGUI API of hiding and showing your own panels. I think you tackled this problem by resizing the effective tab area to a thin strip that just contains the tabs, but Skid got around this in FLTK by creating a single client to which all tab children are added to, and then calling the FLTK setParent() method, reassigning the panel to the currently selected tab-widget. This seems to work quite well and this way, you get the full tabber widget drawn.
> Child windows (windows with a group specified - the undocumented WINDOW_CHILD flag is obsolete now and is ignored by most of the MaxGUI drivers) aren't staying in front of parent windows.
> The only way to keep the context menu open in the TextArea is to hold down the right mouse button. Clicking the right mouse button causes it to show but then hide again in quick succession.
> LookUpGuiFont() - I think we're gonna have to get GTK to return more suitable fonts than the hardcoded presets, as the navbar and output fonts chosen just doesn't look write with the rest of the GTK themed controls. I'll have a mooch around the GTK docs tomorrow if I get a chance.

And finally, a minor point, but on my PC the GTK IDE seems to take quite a long time to start up, getting stuck at a particular point on the splash-screen compared with the FLTK IDE. I'm guessing its the population of the treeview, but I'll have a deeper look into this tomorrow.


SebHoll(Posted 2008) [#58]
lol, might as well keep them coming I suppose...

To keep GTKMaxGUI cutting edge, you might also like to implement CharX() and CharY() methods for the textarea control:

Private Link *click*

;-)


SebHoll(Posted 2008) [#59]
I've had a look into how a native GTK/Pango handler for TGTKGUIDriver.LibraryFont() could be constructed.

The most useful info I could find was actually in wxWidgets' gtk implementation source (font.cpp). wxWidgets appears to have a similar way of determining fonts using constants, with...

wxFONTFAMILY_DEFAULT = GUIFONT_SYSTEM
wxFONTFAMILY_TELETYPE = GUIFONT_MONOSPACE
wxFONTFAMILY_SWISS = GUIFONT_SANSSERIF
wxFONTFAMILY_ROMAN = GUIFONT_SERIF
wxFONTFAMILY_SCRIPT = GUIFONT_SCRIPT

Although I don't think I know enough about Pango/GTK to understand exactly what is going on, it appears as though pange_font_description_set_family is being used, with wxWidgets simply passing "sans", "monospace" or "sansserif".

Not sure it's all too helpful, but thought I'd post anyway...

Oh, finally, now that you've added a LoadFontWithDouble() method to TGTKGUIDriver, you can remove the old LoadFont() as this is only called by TMaxGUIDriver if LoadFontWithDouble() isn't overridden.


Mark Tiffany(Posted 2008) [#60]
Still haven't had a chance to fire up linux, but here are some notes on issues I was having with gtk before.

1) In looking into my issues with gtk & freeprocess, I found that amending the gtk_main_iteration_do call in Wait in gtkgui.bmx to False fixed things. I don't recall if this tweak felt like a sensible fix, or just a hack to get things going - you may want to check it out?

2) In finding issues with treeviews, I found slightly different behaviour between FreeTreeViewNode and FreeGadget, possibly solely because one had been over-ridden with locale functions, rather than a genuine difference. You might want to check that both commands do the same thing. (I think this was my bad, but noted just in case useful!)

3) In treeviews, I did find and fix some CE IDE code that was calling nodes after they had been freed. Although I agree this shouldn't just be ignored, it also didn't fail very nicely on linux. The root cause was iter=Null inside the populatelistrow generating errors when calling gtk_tree_store_set_value. I suggest adding a Debug.Assert iter<>Null...and / or maybe consider ensuring same across other platforms? This may have been related to 2.

4) I was at times getting gtk critical errors on SetGadgetShape on a panel. This was intermittent, and by this stage vastly obscured by the accellerator keys issue, and it was at this point I gave up before.

Firing up the linux beast now...


Mark Tiffany(Posted 2008) [#61]
Okay, I'm all up to date and I now get a failure when it tries to show the main window in CE IDE, after posting loads of noise about that iter=null issue. Still wonder if it's caused because of doing stuff with treeviews with a hidden / disabled window...but no time to look further just now.

(And Seb / markcw - wow, fltk looks usable now!)


Brucey(Posted 2008) [#62]
I shall be having another look at GTKMaxGUI once I've released wxMax proper... (currently porting some wxWidgets tutorials).

I still think anyone playing with nodes that have been removed is not a good thing, kind of implying a logic issue in the application ;-)
Don't mind adding asserts though.

As long as the treeview exists, it shouldn't matter whether it is hidden or not, so I don't think that is a problem.

As for the menu issues in general, they don't appear to be very happy with this new move to using an accelerator map - mainly because I think I've missed out something obvious. I found one example via google, and it appeared to be doing what I'm doing, so I dunno for now. I might have a rummage through the wx code and see what they do - I've got plenty of that source lying around for some reason ;-)


Mark Tiffany(Posted 2008) [#63]
I still think anyone playing with nodes that have been removed is not a good thing, kind of implying a logic issue in the application ;-)
Don't mind adding asserts though.

I totally agree, but this doesn't arise on win32 or fltk (or, apparently on cocoa).

I'm pretty sure "my" code *is* doing something dodgy, but as my main machine is win32 and gtk was a dead dodo to me for the past few months, wasn't really able to pin it down. As soon as I do find a culprit, I'm all for adding some Asserts into *all* versions so as to prevent others from doing stupid things and windows/cocoa/fltk ignoring them...


Mark Tiffany(Posted 2008) [#64]
fyi, in Glasgow tomorrow with work, so unlikely to take a further look at anything until the weekend now.


Brucey(Posted 2008) [#65]
Can you get me a pie from the bakers' while your there? Thanks :-)


Mark Tiffany(Posted 2008) [#66]
Which one, and what kind?

And isn't it a deep fried mars bar you're supposed to have in Glasgow anyway?


Brucey(Posted 2008) [#67]
Oh sorry...

Any baker. I suppose you would call it a Scotch pie... otherwise they are known as "pies" :-p


Funnily enough you can't get them here (in Solihull), other than from the freezer of the local supermarket... however, my local Spar in Pretoria sold them fresh... go figure !


SebHoll(Posted 2008) [#68]
Scotch pies, eh?

The Scotch pie is believed to originate in Scotland,

lol @ Wiki

Hate to bring this thread back on topic :-P, but you might want to add the following to GTKMaxGUI too as it's now supported by all the official modules:

Right-Clicking Tabs


Mark Tiffany(Posted 2008) [#69]
... (in Solihull), ...

Really? I live not very far away in Blackwell (near Bromsgrove). We should do something like suggest that we meet up and then never actually do so... ;-)

Oh, and sorry about the pies - I did buy some, but the queue at airport security was so damn long I ate them myself...


Brucey(Posted 2008) [#70]
The Scotch pie is believed to originate in Scotland,

Well, other than in South Africa, I've yet to be able to walk into a bakers wherever I've lived in England and buy one... so it's not surprising.

We should do something like suggest that we meet up and then never actually do so

Now there's a plan! :-)


Popup menus on Tabs eh? Interesting.

Well, if you are going to all that trouble, why not enable mouse events for labels ;-)


plash(Posted 2008) [#71]
Well, if you are going to all that trouble, why not enable mouse events for labels ;-)
Oooh! Hyperlinks! (not that I really care about MaxGUI anymore.. wxMax is soo amazing - I just wish GTKMaxGUI the best so there can be a DECENT IDE)


Brucey(Posted 2008) [#72]
Oooh! Hyperlinks!

there's actually an old example in the tests folder of GTKMaxGUI (labelovertest.bmx) which does just that.

not that I really care about MaxGUI anymore

Well, I created the beast that is the GTK mod, so I really need to support these legacy things... and yeah, mostly cuz I can't stand the FLTK IDE either.


SebHoll(Posted 2008) [#73]
Well, if you are going to all that trouble, why not enable mouse events for labels ;-)

Oooh! Hyperlinks!

We have! Where have you two been? (Don't answer - this is a MaxGUI thread! :-P) Most gadgets (including labels) can now generate mouse/keyboard events, by calling SetGadgetSensitivity().

Hence, the introduction of the new hyperlink gadget in MaxGUI, available in the MaxGUI.ProxyGadgets module.