From: <wda...@us...> - 2008-08-10 22:32:48
|
Revision: 2938 http://oorexx.svn.sourceforge.net/oorexx/?rev=2938&view=rev Author: wdashley Date: 2008-08-10 22:32:45 +0000 (Sun, 10 Aug 2008) Log Message: ----------- ArtifactID: None Comment: Added the CSELF variable to all init methods. Will add CSELF to the other methods later. Modified Paths: -------------- incubator/RexxGTK/4x/grxaccelgroup.cpp incubator/RexxGTK/4x/grxadjustment.cpp incubator/RexxGTK/4x/grxassistant.cpp incubator/RexxGTK/4x/grxbutton.cpp incubator/RexxGTK/4x/grxcellrenderer.cpp incubator/RexxGTK/4x/grxclipboard.cpp incubator/RexxGTK/4x/grxcombobox.cpp incubator/RexxGTK/4x/grxcontainer.cpp incubator/RexxGTK/4x/grxdialog.cpp incubator/RexxGTK/4x/grxentry.cpp incubator/RexxGTK/4x/grxeventbox.cpp incubator/RexxGTK/4x/grxexpander.cpp incubator/RexxGTK/4x/grxfixed.cpp incubator/RexxGTK/4x/grxglib.cpp incubator/RexxGTK/4x/grxhandlebox.cpp incubator/RexxGTK/4x/grximage.cpp incubator/RexxGTK/4x/grxinterfaces.cpp incubator/RexxGTK/4x/grxlabel.cpp incubator/RexxGTK/4x/grxliststore.cpp incubator/RexxGTK/4x/grxmenu.cpp incubator/RexxGTK/4x/grxmenubar.cpp incubator/RexxGTK/4x/grxmenuitem.cpp incubator/RexxGTK/4x/grxmenutoolbutton.cpp incubator/RexxGTK/4x/grxnotebook.cpp incubator/RexxGTK/4x/grxpaned.cpp incubator/RexxGTK/4x/grxprogressbar.cpp incubator/RexxGTK/4x/grxrange.cpp incubator/RexxGTK/4x/grxscrolledwindow.cpp incubator/RexxGTK/4x/grxstatusbar.cpp incubator/RexxGTK/4x/grxtable.cpp incubator/RexxGTK/4x/grxtextbuffer.cpp incubator/RexxGTK/4x/grxtextview.cpp incubator/RexxGTK/4x/grxtoolbar.cpp incubator/RexxGTK/4x/grxtoolbutton.cpp incubator/RexxGTK/4x/grxtoolitem.cpp incubator/RexxGTK/4x/grxtreestore.cpp incubator/RexxGTK/4x/grxtreeview.cpp incubator/RexxGTK/4x/grxtreeviewcolumn.cpp incubator/RexxGTK/4x/grxwidget.cpp incubator/RexxGTK/4x/grxwindow.cpp Modified: incubator/RexxGTK/4x/grxaccelgroup.cpp =================================================================== --- incubator/RexxGTK/4x/grxaccelgroup.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxaccelgroup.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -125,6 +125,8 @@ accelgrp = gtk_accel_group_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(accelgrp)); context->SendMessage1(self, "POINTER=", context->NewPointer(accelgrp)); g_object_set_data(G_OBJECT(accelgrp), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxadjustment.cpp =================================================================== --- incubator/RexxGTK/4x/grxadjustment.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxadjustment.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -108,6 +108,9 @@ adj = (GtkAdjustment *)gtk_adjustment_new(value, upper, lower, step, page, pagesz); + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(adj)); context->SendMessage1(self, "POINTER=", context->NewPointer(adj)); g_object_set_data(G_OBJECT(adj), "OORXOBJECT", self); @@ -130,6 +133,8 @@ { GtkAdjustment *adj = (GtkAdjustment *)context->PointerValue((RexxPointerObject)rxptr); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(adj)); context->SendMessage1(self, "POINTER=", context->NewPointer(adj)); g_object_set_data(G_OBJECT(adj), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxassistant.cpp =================================================================== --- incubator/RexxGTK/4x/grxassistant.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxassistant.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -104,6 +104,9 @@ GtkWidget *myWidget; myWidget = gtk_assistant_new(); + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxbutton.cpp =================================================================== --- incubator/RexxGTK/4x/grxbutton.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxbutton.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -86,9 +86,10 @@ GrxButtonNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_button_new(); - myWidget = gtk_button_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -209,9 +210,10 @@ GrxToggleButtonNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_toggle_button_new(); - myWidget = gtk_toggle_button_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -357,6 +359,9 @@ else { myWidget = gtk_check_button_new(); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -382,17 +387,19 @@ { RexxPointerObject listptr = NULL; GSList *head = NULL; - GtkWidget *myWidget; if (rxlistptr != context->Nil()) { listptr = (RexxPointerObject)context->SendMessage0(rxlistptr, "POINTER"); head = (GSList *)context->PointerValue(listptr); } // create the widget - myWidget = gtk_radio_button_new(head); + GtkWidget *myWidget = gtk_radio_button_new(head); if (text != NULL) { gtk_button_set_label(GTK_BUTTON(myWidget), text); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -442,6 +449,9 @@ gdk_color_parse(colorstr, &color); myWidget = gtk_color_button_new_with_color(&color); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -536,9 +546,10 @@ CSTRING, title, // Title string int, action) // Title action { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_file_chooser_button_new(title, (GtkFileChooserAction)action); - myWidget = gtk_file_chooser_button_new(title, (GtkFileChooserAction)action); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -556,9 +567,10 @@ GrxFontButtonNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_font_button_new(); - myWidget = gtk_font_button_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxcellrenderer.cpp =================================================================== --- incubator/RexxGTK/4x/grxcellrenderer.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxcellrenderer.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -224,9 +224,10 @@ GrxCellRendererTextNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_text_new(); - myRenderer = gtk_cell_renderer_text_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); @@ -274,9 +275,10 @@ GrxCellRendererPixbufNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_pixbuf_new(); - myRenderer = gtk_cell_renderer_pixbuf_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); @@ -294,9 +296,10 @@ GrxCellRendererProgressNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_progress_new(); - myRenderer = gtk_cell_renderer_progress_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); @@ -314,9 +317,10 @@ GrxCellRendererToggleNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_toggle_new(); - myRenderer = gtk_cell_renderer_toggle_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); @@ -442,9 +446,10 @@ GrxCellRendererAccelNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_accel_new(); - myRenderer = gtk_cell_renderer_accel_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); @@ -500,9 +505,10 @@ GrxCellRendererComboNew, // Object_method name OSELF, self) // Self { - GtkCellRenderer *myRenderer; + GtkCellRenderer *myRenderer = gtk_cell_renderer_combo_new(); - myRenderer = gtk_cell_renderer_combo_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myRenderer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myRenderer)); g_object_set_data(G_OBJECT(myRenderer), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxclipboard.cpp =================================================================== --- incubator/RexxGTK/4x/grxclipboard.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxclipboard.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -73,9 +73,10 @@ GrxClipboardNew, // Object_method name OSELF, self) // Self { - GtkClipboard *myWidget; + GtkClipboard *myWidget = gtk_clipboard_get(GDK_SELECTION_PRIMARY); - myWidget = gtk_clipboard_get(GDK_SELECTION_PRIMARY); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxcombobox.cpp =================================================================== --- incubator/RexxGTK/4x/grxcombobox.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxcombobox.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -102,9 +102,10 @@ GrxComboBoxNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_combo_box_new(); - myWidget = gtk_combo_box_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -122,9 +123,10 @@ GrxComboBoxNewText, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_combo_box_new_text(); - myWidget = gtk_combo_box_new_text(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxcontainer.cpp =================================================================== --- incubator/RexxGTK/4x/grxcontainer.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxcontainer.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -243,10 +243,10 @@ logical_t, homogeneous, // Homogeneous boolean int, spacing) // Spacing amount { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_vbox_new(homogeneous, spacing); - - myWidget = gtk_vbox_new(homogeneous, spacing); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -269,6 +269,8 @@ { GtkVBox *vbox = (GtkVBox *)context->PointerValue((RexxPointerObject)rxptr); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(vbox)); context->SendMessage1(self, "POINTER=", context->NewPointer(vbox)); g_object_set_data(G_OBJECT(vbox), "OORXOBJECT", self); @@ -291,6 +293,8 @@ { RexxPointerObject vboxptr = (RexxPointerObject)context->SendMessage0(ptr, "POINTER"); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(vboxptr)); context->SendMessage1(self, "POINTER=", context->NewPointer(vboxptr)); g_object_set_data(G_OBJECT(ptr), "OORXOBJECT", self); @@ -314,9 +318,10 @@ logical_t, homogeneous, // Homogeneous boolean int, spacing) // Spacing amount { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_hbox_new(homogeneous, spacing); - myWidget = gtk_hbox_new(homogeneous, spacing); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -339,6 +344,8 @@ { GtkVBox *hbox = (GtkVBox *)context->PointerValue((RexxPointerObject)rxptr); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(hbox)); context->SendMessage1(self, "POINTER=", context->NewPointer(hbox)); g_object_set_data(G_OBJECT(hbox), "OORXOBJECT", self); @@ -368,9 +375,10 @@ float, xscale, // Y scale float, yscale) // Y scale { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_alignment_new(xalign, yalign, xscale, yscale); - myWidget = gtk_alignment_new(xalign, yalign, xscale, yscale); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -453,9 +461,10 @@ GtkAdjustment *hadj = (GtkAdjustment *)context->PointerValue(hadjptr); RexxPointerObject vadjptr = (RexxPointerObject)context->SendMessage0(rxvadj, "POINTER"); GtkAdjustment *vadj = (GtkAdjustment *)context->PointerValue(vadjptr); - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_viewport_new(hadj, vadj); - myWidget = gtk_viewport_new(hadj, vadj); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxdialog.cpp =================================================================== --- incubator/RexxGTK/4x/grxdialog.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxdialog.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -102,13 +102,15 @@ GrxDialogNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_dialog_new(); - myWidget = gtk_dialog_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); + + // create the vbox object GtkWidget *vbox = GTK_DIALOG(myWidget)->vbox; - // create the vbox object RexxObjectPtr rxvbox = context->SendMessage1(self, "VBOX=", context->NewPointer(vbox)); return 0; @@ -157,10 +159,14 @@ context->ObjectToNumber(context->ArrayAt(args, i), &rid); gtk_dialog_add_button(GTK_DIALOG(myWidget), bid, rid); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); + + // create the vbox object vbox = GTK_DIALOG(myWidget)->vbox; - // create the vbox object RexxObjectPtr rxvbox = context->SendMessage1(self, "VBOX=", context->NewPointer(vbox)); return 0; @@ -331,6 +337,8 @@ (GtkMessageType)type, (GtkButtonsType)bset, text); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -380,6 +388,9 @@ context->ObjectToNumber(context->ArrayAt(args, i), &rid); gtk_dialog_add_button(GTK_DIALOG(myWidget), bid, rid); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -402,9 +413,10 @@ CSTRING, title, // Dialog title OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_font_selection_dialog_new(title); - myWidget = gtk_font_selection_dialog_new(title); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -469,7 +481,6 @@ RexxPointerObject rxptr = (RexxPointerObject)context->SendMessage0(self, "POINTER"); GtkWidget *myWidget = (GtkWidget *)context->PointerValue(rxptr); - gtk_font_selection_dialog_set_preview_text(GTK_FONT_SELECTION_DIALOG(myWidget), text); @@ -797,12 +808,12 @@ CSTRING, title, // Dialog title OSELF, self) // Self { - GtkWidget *myWidget; - GtkWidget *colorsel; + GtkWidget *myWidget = gtk_color_selection_dialog_new(title); + GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(myWidget)->colorsel; + gtk_color_selection_set_has_opacity_control(GTK_COLOR_SELECTION(colorsel), TRUE); - myWidget = gtk_color_selection_dialog_new(title); - colorsel = GTK_COLOR_SELECTION_DIALOG(myWidget)->colorsel; - gtk_color_selection_set_has_opacity_control(GTK_COLOR_SELECTION(colorsel), TRUE); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxentry.cpp =================================================================== --- incubator/RexxGTK/4x/grxentry.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxentry.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -172,9 +172,10 @@ GrxEntryNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_entry_new(); - myWidget = gtk_entry_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -492,12 +493,12 @@ double, crate, // Climb rate uint32_t, digits) // Digits { - GtkWidget *myWidget; RexxPointerObject adjptr = (RexxPointerObject)context->SendMessage0(rxadj, "POINTER"); GtkAdjustment *adj = (GtkAdjustment *)context->PointerValue(adjptr); + GtkWidget *myWidget = gtk_spin_button_new(adj, crate, digits); - - myWidget = gtk_spin_button_new(adj, crate, digits); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -524,9 +525,10 @@ double, upper, // Upper limit double, step) // Step { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_spin_button_new_with_range(lower, upper, step); - myWidget = gtk_spin_button_new_with_range(lower, upper, step); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxeventbox.cpp =================================================================== --- incubator/RexxGTK/4x/grxeventbox.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxeventbox.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -73,9 +73,10 @@ GrxEventBoxNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_event_box_new(); - myWidget = gtk_event_box_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxexpander.cpp =================================================================== --- incubator/RexxGTK/4x/grxexpander.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxexpander.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -89,9 +89,10 @@ OSELF, self, // Self CSTRING, label) // Expander label { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_expander_new(label); - myWidget = gtk_expander_new(label); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxfixed.cpp =================================================================== --- incubator/RexxGTK/4x/grxfixed.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxfixed.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -73,10 +73,10 @@ GrxFixedNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_fixed_new(); - - myWidget = gtk_fixed_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxglib.cpp =================================================================== --- incubator/RexxGTK/4x/grxglib.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxglib.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -72,9 +72,11 @@ if (ptr == context->Nil()) { context->SendMessage1(self, "POINTER=", context->NewPointer(NULL)); + context->SetObjectVariable("CSELF", context->NewPointer(NULL)); } else { GSList * head = (GSList *)context->PointerValue((RexxPointerObject)ptr); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); } return 0; @@ -117,6 +119,7 @@ GSList *head = (GSList *)context->PointerValue(rxptr); head = g_slist_append(head, (void *)item); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; @@ -140,6 +143,7 @@ GSList *head = (GSList *)context->PointerValue(rxptr); head = g_slist_prepend(head, (void *)item); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; @@ -166,6 +170,7 @@ GSList *head = (GSList *)context->PointerValue(rxptr); head = g_slist_insert(head, (void *)item, pos - 1); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; @@ -240,6 +245,7 @@ GrxGListNew, // Routine name OSELF, self) // Self { + context->SetObjectVariable("CSELF", context->NewPointer(NULL)); context->SendMessage1(self, "POINTER=", context->NewPointer(NULL)); return 0; @@ -282,6 +288,7 @@ GList *head = (GList *)context->PointerValue(rxptr); head = g_list_append(head, (void *)item); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; @@ -305,6 +312,7 @@ GList *head = (GList *)context->PointerValue(rxptr); head = g_list_prepend(head, (void *)item); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; @@ -331,6 +339,7 @@ GList *head = (GList *)context->PointerValue(rxptr); head = g_list_insert(head, (void *)item, pos - 1); + context->SetObjectVariable("CSELF", context->NewPointer(head)); context->SendMessage1(self, "POINTER=", context->NewPointer(head)); return 0; Modified: incubator/RexxGTK/4x/grxhandlebox.cpp =================================================================== --- incubator/RexxGTK/4x/grxhandlebox.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxhandlebox.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -88,9 +88,10 @@ GrxHandleBoxNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_handle_box_new(); - myWidget = gtk_handle_box_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grximage.cpp =================================================================== --- incubator/RexxGTK/4x/grximage.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grximage.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -73,9 +73,10 @@ GrxImageNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_image_new(); - myWidget = gtk_image_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxinterfaces.cpp =================================================================== --- incubator/RexxGTK/4x/grxinterfaces.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxinterfaces.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -251,9 +251,10 @@ GrxFileFilterNew, // Object_method name OSELF, self) // Self { - GtkFileFilter *filter; + GtkFileFilter *filter = gtk_file_filter_new(); - filter = gtk_file_filter_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(filter)); context->SendMessage1(self, "POINTER=", context->NewPointer(filter)); g_object_set_data(G_OBJECT(filter), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxlabel.cpp =================================================================== --- incubator/RexxGTK/4x/grxlabel.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxlabel.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -134,6 +134,9 @@ myWidget = gtk_label_new(text); else myWidget = gtk_label_new("\0"); + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxliststore.cpp =================================================================== --- incubator/RexxGTK/4x/grxliststore.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxliststore.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -86,8 +86,12 @@ } lstore = (GtkListStore *)gtk_list_store_newv(members, types); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(lstore)); context->SendMessage1(self, "POINTER=", context->NewPointer(lstore)); g_object_set_data(G_OBJECT(lstore), "OORXOBJECT", self); + context->SetObjectVariable("!COLTYPES", context->NewPointer(types)); return 0; Modified: incubator/RexxGTK/4x/grxmenu.cpp =================================================================== --- incubator/RexxGTK/4x/grxmenu.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxmenu.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -88,9 +88,10 @@ GrxMenuNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_menu_new(); - myWidget = gtk_menu_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxmenubar.cpp =================================================================== --- incubator/RexxGTK/4x/grxmenubar.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxmenubar.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -73,9 +73,10 @@ GrxMenuBarNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_menu_bar_new(); - myWidget = gtk_menu_bar_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxmenuitem.cpp =================================================================== --- incubator/RexxGTK/4x/grxmenuitem.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxmenuitem.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -116,6 +116,9 @@ myWidget = gtk_menu_item_new_with_label(label); } } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -329,9 +332,10 @@ GrxSeparatorMenuItemNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_separator_menu_item_new(); - myWidget = gtk_separator_menu_item_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -365,6 +369,9 @@ GtkAccelGroup *accelgrpWidget = (GtkAccelGroup *)context->PointerValue(accelgrpptr); myWidget = gtk_image_menu_item_new_from_stock(label, accelgrpWidget); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxmenutoolbutton.cpp =================================================================== --- incubator/RexxGTK/4x/grxmenutoolbutton.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxmenutoolbutton.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -92,10 +92,10 @@ { RexxPointerObject widgetptr = (RexxPointerObject)context->SendMessage0(icon, "POINTER"); GtkWidget *iconWidget = (GtkWidget *)context->PointerValue(widgetptr); - GtkToolItem *toolitem; + GtkToolItem *toolitem = gtk_menu_tool_button_new(iconWidget, label); - toolitem = gtk_menu_tool_button_new(iconWidget, label); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(toolitem)); context->SendMessage1(self, "POINTER=", context->NewPointer(toolitem)); g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxnotebook.cpp =================================================================== --- incubator/RexxGTK/4x/grxnotebook.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxnotebook.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -161,9 +161,10 @@ GrxNotebookNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_notebook_new(); - myWidget = gtk_notebook_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxpaned.cpp =================================================================== --- incubator/RexxGTK/4x/grxpaned.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxpaned.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -173,9 +173,10 @@ GrxVPanedNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_vpaned_new(); - myWidget = gtk_vpaned_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -193,9 +194,10 @@ GrxHPanedNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_hpaned_new(); - myWidget = gtk_hpaned_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxprogressbar.cpp =================================================================== --- incubator/RexxGTK/4x/grxprogressbar.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxprogressbar.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -72,9 +72,10 @@ GrxProgressBarNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_progress_bar_new(); - myWidget = gtk_progress_bar_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxrange.cpp =================================================================== --- incubator/RexxGTK/4x/grxrange.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxrange.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -230,10 +230,11 @@ double, pagesz) // Page size { GtkWidget *myWidget; - GtkAdjustment *adj; + GtkAdjustment *adj = (GtkAdjustment *) gtk_adjustment_new(value, lower, upper, step, page, pagesz); + myWidget = gtk_hscale_new(adj); - adj = (GtkAdjustment *) gtk_adjustment_new(value, lower, upper, step, page, pagesz); - myWidget = gtk_hscale_new(adj); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -260,9 +261,10 @@ double, max, // Maximum double, step) // Step increment { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_hscale_new_with_range(min, max, step); - myWidget = gtk_hscale_new_with_range(min, max, step); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -299,10 +301,11 @@ double, pagesz) // Page size { GtkWidget *myWidget; - GtkAdjustment *adj; + GtkAdjustment *adj = (GtkAdjustment *) gtk_adjustment_new(value, lower, upper, step, page, pagesz); + myWidget = gtk_vscale_new(adj); - adj = (GtkAdjustment *) gtk_adjustment_new(value, lower, upper, step, page, pagesz); - myWidget = gtk_vscale_new(adj); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); @@ -329,9 +332,10 @@ double, max, // Maximum double, step) // Step increment { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_vscale_new_with_range(min, max, step); - myWidget = gtk_vscale_new_with_range(min, max, step); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxscrolledwindow.cpp =================================================================== --- incubator/RexxGTK/4x/grxscrolledwindow.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxscrolledwindow.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -112,7 +112,6 @@ OPTIONAL_RexxObjectPtr, rxhadj, // The horizontal adjustment OPTIONAL_RexxObjectPtr, rxvadj) // The vertical adjustment { - GtkWidget *myWidget; GtkAdjustment *hadj = NULL, *vadj = NULL; if (rxhadj != NULL) { @@ -127,7 +126,10 @@ vadj = (GtkAdjustment *)context->PointerValue(vadjptr); } } - myWidget = gtk_scrolled_window_new(hadj, vadj); + GtkWidget *myWidget = gtk_scrolled_window_new(hadj, vadj); + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxstatusbar.cpp =================================================================== --- incubator/RexxGTK/4x/grxstatusbar.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxstatusbar.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -90,9 +90,10 @@ GrxStatusbarNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_statusbar_new(); - myWidget = gtk_statusbar_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtable.cpp =================================================================== --- incubator/RexxGTK/4x/grxtable.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtable.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -82,10 +82,10 @@ int, cols, // Table columns logical_t, homogeneous) // Homogeneous boolean { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_table_new(rows, cols, homogeneous); - myWidget = gtk_table_new(rows, cols, homogeneous); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtextbuffer.cpp =================================================================== --- incubator/RexxGTK/4x/grxtextbuffer.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtextbuffer.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -95,6 +95,9 @@ else { myBuffer = (GtkTextBuffer *)context->PointerValue((RexxPointerObject)rxptr); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myBuffer)); context->SendMessage1(self, "POINTER=", context->NewPointer(myBuffer)); g_object_set_data(G_OBJECT(myBuffer), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtextview.cpp =================================================================== --- incubator/RexxGTK/4x/grxtextview.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtextview.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -188,9 +188,10 @@ GrxTextViewNew, // Object_method name OSELF, self) // Self { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_text_view_new(); - myWidget = gtk_text_view_new(); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtoolbar.cpp =================================================================== --- incubator/RexxGTK/4x/grxtoolbar.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtoolbar.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -143,10 +143,10 @@ GrxToolbarNew, // Object_method name OSELF, self) // Self { - GtkWidget *toolbar; + GtkWidget *toolbar = gtk_toolbar_new(); - toolbar = gtk_toolbar_new(); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(toolbar)); context->SendMessage1(self, "POINTER=", context->NewPointer(toolbar)); g_object_set_data(G_OBJECT(toolbar), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtoolbutton.cpp =================================================================== --- incubator/RexxGTK/4x/grxtoolbutton.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtoolbutton.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -92,10 +92,10 @@ { RexxPointerObject widgetptr = (RexxPointerObject)context->SendMessage0(icon, "POINTER"); GtkWidget *iconWidget = (GtkWidget *)context->PointerValue(widgetptr); - GtkToolItem *toolitem; + GtkToolItem *toolitem = gtk_tool_button_new(iconWidget, label); - toolitem = gtk_tool_button_new(iconWidget, label); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(toolitem)); context->SendMessage1(self, "POINTER=", context->NewPointer(toolitem)); g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self); @@ -383,10 +383,10 @@ GrxSeparatorToolItemNew, // Object_method name OSELF, self) // Self { - GtkToolItem *toolitem; + GtkToolItem *toolitem = gtk_separator_tool_item_new(); - toolitem = gtk_separator_tool_item_new(); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(toolitem)); context->SendMessage1(self, "POINTER=", context->NewPointer(toolitem)); g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtoolitem.cpp =================================================================== --- incubator/RexxGTK/4x/grxtoolitem.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtoolitem.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -126,10 +126,10 @@ GrxToolItemNew, // Object_method name OSELF, self) // Self { - GtkToolItem *toolitem; + GtkToolItem *toolitem = gtk_tool_item_new(); - toolitem = gtk_tool_item_new(); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(toolitem)); context->SendMessage1(self, "POINTER=", context->NewPointer(toolitem)); g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtreestore.cpp =================================================================== --- incubator/RexxGTK/4x/grxtreestore.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtreestore.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -86,8 +86,12 @@ } tstore = (GtkTreeStore *)gtk_tree_store_newv(members, (GType *)types); } + + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(tstore)); context->SendMessage1(self, "POINTER=", context->NewPointer(tstore)); g_object_set_data(G_OBJECT(tstore), "OORXOBJECT", self); + context->SetObjectVariable("!COLTYPES", context->NewPointer(types)); return 0; Modified: incubator/RexxGTK/4x/grxtreeview.cpp =================================================================== --- incubator/RexxGTK/4x/grxtreeview.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtreeview.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -209,10 +209,10 @@ GrxTreeViewNew, // Object_method name OSELF, self) // Self { - GtkWidget *treeview; + GtkWidget *treeview = gtk_tree_view_new(); - treeview = gtk_tree_view_new(); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(treeview)); context->SendMessage1(self, "POINTER=", context->NewPointer(treeview)); g_object_set_data(G_OBJECT(treeview), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxtreeviewcolumn.cpp =================================================================== --- incubator/RexxGTK/4x/grxtreeviewcolumn.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxtreeviewcolumn.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -86,10 +86,10 @@ GrxTreeViewColumnNew, // Object_method name OSELF, self) // Self { - GtkTreeViewColumn *treeviewcol; + GtkTreeViewColumn *treeviewcol = gtk_tree_view_column_new(); - treeviewcol = gtk_tree_view_column_new(); - + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(treeviewcol)); context->SendMessage1(self, "POINTER=", context->NewPointer(treeviewcol)); g_object_set_data(G_OBJECT(treeviewcol), "OORXOBJECT", self); Modified: incubator/RexxGTK/4x/grxwidget.cpp =================================================================== --- incubator/RexxGTK/4x/grxwidget.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxwidget.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -134,6 +134,8 @@ { GtkWidget *myWidget = NULL; + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); // This is an abstract class so no actual widget is created return 0; Modified: incubator/RexxGTK/4x/grxwindow.cpp =================================================================== --- incubator/RexxGTK/4x/grxwindow.cpp 2008-08-10 17:28:07 UTC (rev 2937) +++ incubator/RexxGTK/4x/grxwindow.cpp 2008-08-10 22:32:45 UTC (rev 2938) @@ -104,9 +104,10 @@ OSELF, self, // Self int, type) // Window type { - GtkWidget *myWidget; + GtkWidget *myWidget = gtk_window_new((GtkWindowType)type); - myWidget = gtk_window_new((GtkWindowType)type); + // Save ourself + context->SetObjectVariable("CSELF", context->NewPointer(myWidget)); g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self); context->SendMessage1(self, "POINTER=", context->NewPointer(myWidget)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |