Re: [Gambas-user] Dialog.OpenFile raises signal #6
Benoît, I'm not happy with my new compilation of Gb3, the debug process doesn't run properly. I'll install Gambas again Bill -- View this message in context: http://gambas.8142.n7.nabble.com/Dialog-OpenFile-raises-signal-6-tp40108p40165.html Sent from the gambas-user mailing list archive at Nabble.com. -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Problem clearing picture in a PictureBox
Hi, I've this form with a Panel and in there some TextBoxes, PictureBoxes and some Buttons. Button opens a Dialog to browse for PNG files and when selected show use the Dialog.Path to load the PNG into PictureBox (using PicBox.Picture = Picture.Load(Dialog.Path)) At a certain moment I want to clear the form and have this little rountine: Public Sub PanelClear() TextBox1.Clear TextBox2.Clear PictureBox1.Picture.Clear PictureBox2.Picture.Clear Me.Refresh End TextBoxes clear properly, but PictureBoxes don't. The loaded PNG stays visible in the PictureBox. If one of the PictureBoxes has no loaded picture in there on clearing an error is generated because of it being Null. 1. How do I get the PictureBoxes cleared of the shown picture? Am I using Clear wrongly? Also tried PictureBox1.Picture.Flush with no success. 2. How test for a empty PictureBox? I tried testing with IsNull(PictureBox.Picture), but that doesn't seem to do the job. Any suggestions that might get me on the road again? Running Gambas 3.3.4 on Linux Mint 13 - Mate desktop Using gb.qt4 in the project. Willy -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Problem clearing picture in a PictureBox
Le 30/11/2012 16:04, Willy Raets a écrit : Hi, I've this form with a Panel and in there some TextBoxes, PictureBoxes and some Buttons. Button opens a Dialog to browse for PNG files and when selected show use the Dialog.Path to load the PNG into PictureBox (using PicBox.Picture = Picture.Load(Dialog.Path)) At a certain moment I want to clear the form and have this little rountine: Public Sub PanelClear() TextBox1.Clear TextBox2.Clear PictureBox1.Picture.Clear PictureBox2.Picture.Clear Me.Refresh End TextBoxes clear properly, but PictureBoxes don't. The loaded PNG stays visible in the PictureBox. If one of the PictureBoxes has no loaded picture in there on clearing an error is generated because of it being Null. 1. How do I get the PictureBoxes cleared of the shown picture? Am I using Clear wrongly? Also tried PictureBox1.Picture.Flush with no success. 2. How test for a empty PictureBox? I tried testing with IsNull(PictureBox.Picture), but that doesn't seem to do the job. Any suggestions that might get me on the road again? Running Gambas 3.3.4 on Linux Mint 13 - Mate desktop Using gb.qt4 in the project. Willy PictureBox1.Picture = Null PictureBox1.Picture.Clear only clears the contents of the picture returned by the property, which is somewhat a copy of the internal picture of the PictureBox which stays unchanged. Regards, -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Problem clearing picture in a PictureBox
On Fri, 2012-11-30 at 16:06 +0100, Benoît Minisini wrote: Le 30/11/2012 16:04, Willy Raets a écrit : Hi, I've this form with a Panel and in there some TextBoxes, PictureBoxes and some Buttons. Button opens a Dialog to browse for PNG files and when selected show use the Dialog.Path to load the PNG into PictureBox (using PicBox.Picture = Picture.Load(Dialog.Path)) At a certain moment I want to clear the form and have this little rountine: Public Sub PanelClear() TextBox1.Clear TextBox2.Clear PictureBox1.Picture.Clear PictureBox2.Picture.Clear Me.Refresh End TextBoxes clear properly, but PictureBoxes don't. The loaded PNG stays visible in the PictureBox. If one of the PictureBoxes has no loaded picture in there on clearing an error is generated because of it being Null. 1. How do I get the PictureBoxes cleared of the shown picture? Am I using Clear wrongly? Also tried PictureBox1.Picture.Flush with no success. 2. How test for a empty PictureBox? I tried testing with IsNull(PictureBox.Picture), but that doesn't seem to do the job. Any suggestions that might get me on the road again? Running Gambas 3.3.4 on Linux Mint 13 - Mate desktop Using gb.qt4 in the project. Willy PictureBox1.Picture = Null PictureBox1.Picture.Clear only clears the contents of the picture returned by the property, which is somewhat a copy of the internal picture of the PictureBox which stays unchanged. Simple and effective :) Works as a charm. Thank you, Willy -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Group property of controls in IDE
Hi, Is there any documentation on how to use the group property for controls in IDE? How do I use this feature? Is it possible to make things happen to all controls part to the same group at once? That is what I hope it does, but I can't find anything in the documentation. Willy -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Group property of controls in IDE
On Fri, 30 Nov 2012, Willy Raets wrote: Hi, Is there any documentation on how to use the group property for controls in IDE? How do I use this feature? Is it possible to make things happen to all controls part to the same group at once? That is what I hope it does, but I can't find anything in the documentation. Willy If the documentation fails, look in the mailing list archive. I remember several questions about Group. Anyway, you must know that this cannot be documented in any component because it is a virtual property existing only in the IDE. What does it do? It makes all the controls in the same group raise events with the same name, i.e. a Group of buttons with the group name mybuttons will all raise their Click() event, e.g., as mybuttons_Click(). Where did I read this? In the IDE, you can click on the Group property field in the properties window. In the default configuration, you should see a help box explaining all this just below that properties grid. Regards, Tobi -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to invoke warnings in Gambas3 IDE?
Hello! I would like to cleanup the project from the unused variables. I see Warnings in IDE sometimes, but I didn't find the way how to invoke this function. Csaba -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas-user Digest, Vol 78, Issue 77
Message: 5 Date: Thu, 29 Nov 2012 13:15:03 +0100 From: Beno?t Minisini gam...@users.sourceforge.net Subject: Re: [Gambas-user] multiple mp3 play with gambas To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 50b751c7.7080...@users.sourceforge.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Le 29/11/2012 13:02, Federico Allegretti a ?crit : hello, after years developing in vb6/.net on windows platforms, i'm forcing to switch to the linux operating system. I discovered gambas like a very easy and painless very high level programming language, and in few minutes i installed the IDE/compiler and wrote down a simple mp3 player (using gb.sd.music) now i need to find a way to replace my radio automation software (i wrote in VB6) with something compatible with ubuntu systems, but i discovered i cannot use gb.sdl to playback multiple mp3 files at the same time (need to cross dissolve songs). There are plan to extend g.sdl features or there is an alternative? Other multimedia libraries (gstreamer)? Thanks a lot, Federico Allegretti The gb.media component is the Gambas interface to gstreamer. It is not complete, but powerful enough to implement a media player (see the MediaPlayer example). If you succeed in using it to play multiple sound files at the same time, just tell me. At the moment I only played one multimedia file at a time, and even don't know how to play several ones with gstreamer. Regards, -- Beno?t Minisini nice results using this simple code (needed buttons, labels and reference to the gb.media are to drop on the form ... and a pair of mp3 to play :D) project attached Private Player_A As MediaPlayer Private Player_B As MediaPlayer Public Sub _new() End Public Sub Form_Open() End Public Sub Button_play1_Click() Player_A = New MediaPlayer As MediaPlayer Player_A.URL = Media.URL(Label_file1.text) Player_A.Play End Public Sub Button_File1_Click() Dialog.Title = chose MP3 file Dialog.Filter = [*.mp3, mp3 files, *, all files] Dialog.Path = . If Dialog.OpenFile() Then Return Else 'Message.Info(Dialog.Path, OK) Label_file1.Text = Dialog.Path Endif End Public Sub Button_File2_Click() Dialog.Title = chose MP3 file Dialog.Filter = [*.mp3, mp3 files, *, all files] Dialog.Path = . If Dialog.OpenFile() Then Return Else 'Message.Info(Dialog.Path, OK) Label_file2.Text = Dialog.Path Endif End Public Sub Button_play2_Click() Player_B = New MediaPlayer As MediaPlayer Player_B.URL = Media.URL(Label_file2.text) Player_B.Play End -- Messagenet VOIP: 5338759 My blogs: http://altri-media.blogspot.com/ http://subbaqquerie.blogspot.com/ YouTube Channel: AllegFede VIMEO HD videos: http://www.vimeo.com/user1912745/videos gambas-2-mp3-play-test-0.0.1.tar.gz Description: GNU Zip compressed data -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to invoke warnings in Gambas3 IDE?
Activate warnings from Project properties - Options - Activate warnings. Then click on Compile All. See attached screenshot. Jussi On Fri, Nov 30, 2012 at 7:24 PM, M. Cs. mohar...@gmail.com wrote: Hello! I would like to cleanup the project from the unused variables. I see Warnings in IDE sometimes, but I didn't find the way how to invoke this function. Csaba -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user attachment: Screenshot.png-- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Stretchable GridView
I have a GridView with constant number of rows.The rows are painted with different colors than the GUI's background. How it is possible to set the grid view to loose the white area on the bottom of the gridView? The Form is resizeable and I would like to have gridView's area filled with the 9 rows regardless of the Form's state. Thanks! attachment: snapshot1.png-- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Stretchable GridView
Le 30/11/2012 20:14, M. Cs. a écrit : I have a GridView with constant number of rows.The rows are painted with different colors than the GUI's background. How it is possible to set the grid view to loose the white area on the bottom of the gridView? The Form is resizeable and I would like to have gridView's area filled with the 9 rows regardless of the Form's state. Thanks! If you use the development version, you can use GridView.ClientH to know the size of the client area, and then resize the rows accordingly. Set the most common row height with the GridView.Rows.Height property, it's faster that setting the height for each row. Regards, -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb.data is usable
Hi folks, I only wanted to announce that I just finished the List class and thus, the gb.data component as far as it is, is completely usable. Use it! I attached my personal test project (adt_test) which mainly does obscure things with the objects to check for memory leaks and errors. Valgrind doesn't report anything so I'm happy with that. It may be too dirty to learn from... There is, too, some benchmark project (stress_adt) comparing the performance of List and Variant[] in three well-chosen test cases because of which it is really not good to learn from, actually ;-) Sorry, the projects date back to when the component was named gb.adt, hence the names. I never opened them with the IDE so I don't know if there can be any problems with the IDE control files I wrote. I'll quickly document the remaining stuff and then rage on to new classes. IIRC, binary search trees were anticipated very much? Regards, Tobi adt_test-0.0.3.tar.gz Description: Binary data stress_adt-0.0.3.tar.gz Description: Binary data -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
Le 30/11/2012 22:07, Tobias Boege a écrit : Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi I can't copy the new symbols information files on the wiki before you do the commit. Seems logical. :-) -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
Le 30/11/2012 21:47, Tobias Boege a écrit : ...binary search trees were anticipated very much? I don't know, but it will be useful for sure. We can live without List as soon as we have arrays, but binary trees (and red-black trees) are irreplaceable! Regards, -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
On Fri, 30 Nov 2012, Beno?t Minisini wrote: Le 30/11/2012 22:07, Tobias Boege a ?crit : Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi I can't copy the new symbols information files on the wiki before you do the commit. Seems logical. :-) Could you check your inbox again, please? The archive already lists the commit: http://sourceforge.net/mailarchive/message.php?msg_id=30168719 -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Point sort methods
Hi! I'm replacing my own point implementation with Gambas native implementation (which is almost same). And I cannot find documentation about point sort methods... My own implementation included sort by euclidean distance to given reference point, does native point class have this? And if it does, how to use it? Jussi -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Point sort methods
Hmph... of course it is same as sort method of object array. Sorry about confusion. But maybe point should have this compare option... Jussi On Fri, Nov 30, 2012 at 11:21 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: Hi! I'm replacing my own point implementation with Gambas native implementation (which is almost same). And I cannot find documentation about point sort methods... My own implementation included sort by euclidean distance to given reference point, does native point class have this? And if it does, how to use it? Jussi -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Point sort methods
Le 30/11/2012 22:30, Jussi Lahtinen a écrit : Hmph... of course it is same as sort method of object array. Sorry about confusion. But maybe point should have this compare option... Jussi You can inherit Point and implement your own '_compare' method. -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
Le 30/11/2012 22:20, Tobias Boege a écrit : On Fri, 30 Nov 2012, Beno?t Minisini wrote: Le 30/11/2012 22:07, Tobias Boege a ?crit : Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi I can't copy the new symbols information files on the wiki before you do the commit. Seems logical. :-) Could you check your inbox again, please? The archive already lists the commit: http://sourceforge.net/mailarchive/message.php?msg_id=30168719 I got it. I just finish a few things, and I will update the wiki... -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
Le 30/11/2012 22:44, Benoît Minisini a écrit : Le 30/11/2012 22:20, Tobias Boege a écrit : On Fri, 30 Nov 2012, Beno?t Minisini wrote: Le 30/11/2012 22:07, Tobias Boege a ?crit : Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi I can't copy the new symbols information files on the wiki before you do the commit. Seems logical. :-) Could you check your inbox again, please? The archive already lists the commit: http://sourceforge.net/mailarchive/message.php?msg_id=30168719 I got it. I just finish a few things, and I will update the wiki... Wiki symbols updated! -- Benoît Minisini -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Wiki documentation batch
That way, at least components written in Gambas could be first documented inside the source code. For the components written in C/C++, we need a tool that extracts the help comments from the source code and put them in the *.info file the same way the Gambas compiler does. Concerning that tool, wouldn't a simple sed or awk script suffice? Is there any reference for this markdown derivate for Gambas (found nothing obvious in the wiki)? I imagine that this tool can be done completely in some hours, at most. Oh, I had a look again at the thread where you introduced that new syntax and someone pointed to an example of this documentation syntax in the IDE. I have looked into a .info file made by the compiler out of a documented component and wrote an awk script that does similar things for C/C++ Gambas sources. You just get the output, I don't know what to do with it further, especially in what concrete format the information has to be (like the .info files with name, type of symbol, documentation?) However, I set down some rules for the C/C++ documentation (feel free to object): - Those comments must begin with /** on a single line - They must end with **/ on a line of itself - They must relate to the next line beginning with BEGIN_ I grep'd for the /** and **/ patterns in the whole source tree. The latter was never found, the former sometimes. Let me know if you are interested/I can improve/reformat/... Regards, Tobi #!/usr/bin/awk -f BEGIN { do_record = do_search = do_expect = 0; FS=; } /^\/\*\*$/ { if (do_search) print DUMMY\n; do_record = 1; } { if (do_record || do_expect) print $0; } /^ \*\*\/$/ { do_record = 0; do_search = 1; } # One-liners /^BEGIN\_.*\(.*\)$/ { if (do_search) { print $0 \n; do_search = 0; } } # Multi-liners /^BEGIN\_.*\(/ { if (do_search) { do_expect = 1; print $0; } } /\)$/ { if (do_search do_expect) { do_search = do_expect = 0; print ; } } END { if (do_search) print DUMMY\n; } /* * Don't even try to compile */ /** * ## Description ## * Documentation * ## Arguments ## * None * ## Argument Types ## * None **/ /*** * This function just exists. **/ BEGIN_METHOD_VOID(func) asm(nop;); END_METHOD /** * ## Description ## * Something's missing **/ /** * ## Description ## * Another function **/ BEGIN_METHOD(func2, int this_is_a_long_argument_name, int yet_another_long_argument_name, char third_one_for_multiple_lines) asm(finit;); END_METHOD /* * This function just exits. */ int main() { exit(0); } /** * ## Description ## * Last one of its kind * ## Arguments ## * What format? **/ BEGIN_METHOD(funcX, int i) asm(syscall; :: a (i)); END_METHOD /** One final comment **/ -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.data is usable
On Fri, 30 Nov 2012, Beno?t Minisini wrote: Le 30/11/2012 22:44, Beno?t Minisini a ?crit : Le 30/11/2012 22:20, Tobias Boege a ?crit : On Fri, 30 Nov 2012, Beno?t Minisini wrote: Le 30/11/2012 22:07, Tobias Boege a ?crit : Hrrm... Can somebody voodoo the wiki to take the new symbols of the List class into account? Several ones are missing. Thanks, Tobi I can't copy the new symbols information files on the wiki before you do the commit. Seems logical. :-) Could you check your inbox again, please? The archive already lists the commit: http://sourceforge.net/mailarchive/message.php?msg_id=30168719 I got it. I just finish a few things, and I will update the wiki... Wiki symbols updated! English documentation completed. Thanks. -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Trouble removing menu item during run time
I have this piece of code (in a rather big project) that build op a menu during run time in case AddOns get installed. Each installed AddOn gets it own Menu Item upon installation for launching the AddOn. THis all works like clockwork. This is the code that creates the menu items for each Add On installed: For iNdex = 1 To AddOnNumber hMenuItem = New Menu(hMenu) As _MenuEvent With hMenuItem .Name = mnu AddOnName[iNdex] .Enabled = True .Caption = AddOnName[iNdex] .Text = AddOnName[iNdex] ... .Picture = Picture.Load(AddOnPath / AddOnName[iNdex] .png) End With Next Now I write code to remove the installed AddOns if users want to. Removing is no problem and works well. Only problem that remains is how to remove the menu item that starts the AddOn during run time? In my Subroutine Remove() the name of the AddOn menu item to be removed is: mnu AvailableName[Index] AvailableName[Index] is the name of the AddOn that has been removed a few lines of code before. How do I remove this menu item? Any suggestions? Thanks, Willy -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Group property of controls in IDE
On Fri, 2012-11-30 at 16:51 +0100, Tobias Boege wrote: On Fri, 30 Nov 2012, Willy Raets wrote: Hi, Is there any documentation on how to use the group property for controls in IDE? How do I use this feature? Is it possible to make things happen to all controls part to the same group at once? That is what I hope it does, but I can't find anything in the documentation. Willy If the documentation fails, look in the mailing list archive. I remember several questions about Group. Anyway, you must know that this cannot be documented in any component because it is a virtual property existing only in the IDE. What does it do? It makes all the controls in the same group raise events with the same name, i.e. a Group of buttons with the group name mybuttons will all raise their Click() event, e.g., as mybuttons_Click(). Where did I read this? In the IDE, you can click on the Group property field in the properties window. In the default configuration, you should see a help box explaining all this just below that properties grid. Oops, forgot the IDE help :-) Anyway thanks for the help. It's cleared up some confusion in my mind about Group property :) Regards, Tobi Willy -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Trouble removing menu item during run time
On Sat, 2012-12-01 at 01:13 +0100, Willy Raets wrote: I have this piece of code (in a rather big project) that build op a menu during run time in case AddOns get installed. Each installed AddOn gets it own Menu Item upon installation for launching the AddOn. THis all works like clockwork. This is the code that creates the menu items for each Add On installed: For iNdex = 1 To AddOnNumber hMenuItem = New Menu(hMenu) As _MenuEvent With hMenuItem .Name = mnu AddOnName[iNdex] .Enabled = True .Caption = AddOnName[iNdex] .Text = AddOnName[iNdex] ... .Picture = Picture.Load(AddOnPath / AddOnName[iNdex] .png) End With Next Now I write code to remove the installed AddOns if users want to. Removing is no problem and works well. Only problem that remains is how to remove the menu item that starts the AddOn during run time? In my Subroutine Remove() the name of the AddOn menu item to be removed is: mnu AvailableName[Index] AvailableName[Index] is the name of the AddOn that has been removed a few lines of code before. How do I remove this menu item? Any suggestions? Thanks, Willy (Quick answer) You could just set its' .Visible to false B -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Trouble removing menu item during run time
On Sat, 2012-12-01 at 11:00 +1030, Bruce wrote: On Sat, 2012-12-01 at 01:13 +0100, Willy Raets wrote: I have this piece of code (in a rather big project) that build op a menu during run time in case AddOns get installed. Each installed AddOn gets it own Menu Item upon installation for launching the AddOn. THis all works like clockwork. This is the code that creates the menu items for each Add On installed: For iNdex = 1 To AddOnNumber hMenuItem = New Menu(hMenu) As _MenuEvent With hMenuItem .Name = mnu AddOnName[iNdex] .Enabled = True .Caption = AddOnName[iNdex] .Text = AddOnName[iNdex] ... .Picture = Picture.Load(AddOnPath / AddOnName[iNdex] .png) End With Next Now I write code to remove the installed AddOns if users want to. Removing is no problem and works well. Only problem that remains is how to remove the menu item that starts the AddOn during run time? In my Subroutine Remove() the name of the AddOn menu item to be removed is: mnu AvailableName[Index] AvailableName[Index] is the name of the AddOn that has been removed a few lines of code before. How do I remove this menu item? Any suggestions? Thanks, Willy (Quick answer) You could just set its' .Visible to false Even better .Delete exists for menu items, but that isn't the problem. When I remove AddOn1 I need: mnuAddOn1.Delete (or .Visible = False) When I remove AddOn2 I need: mnuAddOn2.Delete (or .Visible = False) When I remove MyAddOn I need: mnuAddOn.Delete (or .Visible = False) Problem: When removing AddOn1 when running the application the name of the menu to remove mnuAddOn1 is in a string variable When removing AddOn2 when running the application the name of the menu to remove mnuAddOn2 is in a string variable How to tell Gambas that the String content is the name of the menu? Example: Dim sMenuNAme As String sMenuName = mnu AvailableName[Index] And now? I can't do: mnuAddOn1.Delete in my code as I don't know that it is named mnuAddOn1 at coding time since that is determined during run time. AvailableName[Index] is the name of the AddOn being removed at that time. Remember menus of add ons are made during runtime when the Addon is installed and menu items are named mnu AddOnName that just got installed. Seemed logic at the time but not that sure anymore. Thanks anyway, Willy -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Trouble removing menu item during run time
Simply tous need to store the menu instance in an array or a collection. Collection is usefully as you can retrieve menu from a name So in your form header Private $colMenu as new collection In the menu creation: ... $colMenu[AddonName.index]=hmenu ... For delete $colMenu[AddonName.index] .delete $colMenu[AddonName.index]=NULL THAT'S ALL :-) Le 1 déc. 2012 05:22, Willy Raets wi...@earthshipbelgium.be a écrit : On Sat, 2012-12-01 at 11:00 +1030, Bruce wrote: On Sat, 2012-12-01 at 01:13 +0100, Willy Raets wrote: I have this piece of code (in a rather big project) that build op a menu during run time in case AddOns get installed. Each installed AddOn gets it own Menu Item upon installation for launching the AddOn. THis all works like clockwork. This is the code that creates the menu items for each Add On installed: For iNdex = 1 To AddOnNumber hMenuItem = New Menu(hMenu) As _MenuEvent With hMenuItem .Name = mnu AddOnName[iNdex] .Enabled = True .Caption = AddOnName[iNdex] .Text = AddOnName[iNdex] ... .Picture = Picture.Load(AddOnPath / AddOnName[iNdex] .png) End With Next Now I write code to remove the installed AddOns if users want to. Removing is no problem and works well. Only problem that remains is how to remove the menu item that starts the AddOn during run time? In my Subroutine Remove() the name of the AddOn menu item to be removed is: mnu AvailableName[Index] AvailableName[Index] is the name of the AddOn that has been removed a few lines of code before. How do I remove this menu item? Any suggestions? Thanks, Willy (Quick answer) You could just set its' .Visible to false Even better .Delete exists for menu items, but that isn't the problem. When I remove AddOn1 I need: mnuAddOn1.Delete (or .Visible = False) When I remove AddOn2 I need: mnuAddOn2.Delete (or .Visible = False) When I remove MyAddOn I need: mnuAddOn.Delete (or .Visible = False) Problem: When removing AddOn1 when running the application the name of the menu to remove mnuAddOn1 is in a string variable When removing AddOn2 when running the application the name of the menu to remove mnuAddOn2 is in a string variable How to tell Gambas that the String content is the name of the menu? Example: Dim sMenuNAme As String sMenuName = mnu AvailableName[Index] And now? I can't do: mnuAddOn1.Delete in my code as I don't know that it is named mnuAddOn1 at coding time since that is determined during run time. AvailableName[Index] is the name of the AddOn being removed at that time. Remember menus of add ons are made during runtime when the Addon is installed and menu items are named mnu AddOnName that just got installed. Seemed logic at the time but not that sure anymore. Thanks anyway, Willy -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Trouble removing menu item during run time
Not addonname.index but addonname[index] Le 1 déc. 2012 07:28, Fabien Bodard gambas...@gmail.com a écrit : Simply tous need to store the menu instance in an array or a collection. Collection is usefully as you can retrieve menu from a name So in your form header Private $colMenu as new collection In the menu creation: ... $colMenu[AddonName.index]=hmenu ... For delete $colMenu[AddonName.index] .delete $colMenu[AddonName.index]=NULL THAT'S ALL :-) Le 1 déc. 2012 05:22, Willy Raets wi...@earthshipbelgium.be a écrit : On Sat, 2012-12-01 at 11:00 +1030, Bruce wrote: On Sat, 2012-12-01 at 01:13 +0100, Willy Raets wrote: I have this piece of code (in a rather big project) that build op a menu during run time in case AddOns get installed. Each installed AddOn gets it own Menu Item upon installation for launching the AddOn. THis all works like clockwork. This is the code that creates the menu items for each Add On installed: For iNdex = 1 To AddOnNumber hMenuItem = New Menu(hMenu) As _MenuEvent With hMenuItem .Name = mnu AddOnName[iNdex] .Enabled = True .Caption = AddOnName[iNdex] .Text = AddOnName[iNdex] ... .Picture = Picture.Load(AddOnPath / AddOnName[iNdex] .png) End With Next Now I write code to remove the installed AddOns if users want to. Removing is no problem and works well. Only problem that remains is how to remove the menu item that starts the AddOn during run time? In my Subroutine Remove() the name of the AddOn menu item to be removed is: mnu AvailableName[Index] AvailableName[Index] is the name of the AddOn that has been removed a few lines of code before. How do I remove this menu item? Any suggestions? Thanks, Willy (Quick answer) You could just set its' .Visible to false Even better .Delete exists for menu items, but that isn't the problem. When I remove AddOn1 I need: mnuAddOn1.Delete (or .Visible = False) When I remove AddOn2 I need: mnuAddOn2.Delete (or .Visible = False) When I remove MyAddOn I need: mnuAddOn.Delete (or .Visible = False) Problem: When removing AddOn1 when running the application the name of the menu to remove mnuAddOn1 is in a string variable When removing AddOn2 when running the application the name of the menu to remove mnuAddOn2 is in a string variable How to tell Gambas that the String content is the name of the menu? Example: Dim sMenuNAme As String sMenuName = mnu AvailableName[Index] And now? I can't do: mnuAddOn1.Delete in my code as I don't know that it is named mnuAddOn1 at coding time since that is determined during run time. AvailableName[Index] is the name of the AddOn being removed at that time. Remember menus of add ons are made during runtime when the Addon is installed and menu items are named mnu AddOnName that just got installed. Seemed logic at the time but not that sure anymore. Thanks anyway, Willy -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user