User forums > Using Code::Blocks

Image field in wxImagePanel wxSmith tools

<< < (4/4)

ollydbg:

--- Quote from: oBFusCATed on November 04, 2018, 03:31:33 am ---I'm not following the topic, but please check that old wxs files still work and produce correct code!

--- End quote ---
OK, I will check it.
In-fact, my patch does not change the way the old wxs does, because the old way of wxImagePanel use an Image ID of the wxImageTool. My patch just add another option when the old way failed, which means there is no such Image ID found in the wxImageTool.

ollydbg:
I have confirmed that using the old way(first add a wxImage tool control, then add a wxImagePanel with the var name of the wxImage) and the new way(with my patch) generate the identical source code.

So, the patch is in trunk now.

ollydbg:

--- Quote from: oBFusCATed on November 04, 2018, 03:31:33 am ---I'm not following the topic, but please check that old wxs files still work and produce correct code!

--- End quote ---
Today, I found one issue about my changes in rev11510.

I have a wxImagePanel control in wxSmith which is created by C::B 17.12.
The Image field is "<none>".
When I load this wxs file, the latest C::B will complain that there is not file named "<none>", and a MessageBox will shown.
I think I need to handle this special case for the migration.

EDIT:

--- Code: ---+    wxBitmap ImagePanel2_bmp = wxBitmap(wxImage(("")));
+    ImagePanel2->SetBitmap(ImagePanel2_bmp);

+    wxBitmap ImagePanel1_bmp = wxBitmap(wxImage(("<none>")));
+    ImagePanel1->SetBitmap(ImagePanel1_bmp);
--- End code ---

So, it should not create the above two code snippet if the Image field is empty or "<none>"

ollydbg:

--- Quote from: ollydbg on February 01, 2019, 03:41:15 pm ---
--- Quote from: oBFusCATed on November 04, 2018, 03:31:33 am ---I'm not following the topic, but please check that old wxs files still work and produce correct code!

--- End quote ---
Today, I found one issue about my changes in rev11510.

I have a wxImagePanel control in wxSmith which is created by C::B 17.12.
The Image field is "<none>".
When I load this wxs file, the latest C::B will complain that there is not file named "<none>", and a MessageBox will shown.
I think I need to handle this special case for the migration.

EDIT:

--- Code: ---+    wxBitmap ImagePanel2_bmp = wxBitmap(wxImage(("")));
+    ImagePanel2->SetBitmap(ImagePanel2_bmp);

+    wxBitmap ImagePanel1_bmp = wxBitmap(wxImage(("<none>")));
+    ImagePanel1->SetBitmap(ImagePanel1_bmp);
--- End code ---

So, it should not create the above two code snippet if the Image field is empty or "<none>"

--- End quote ---

Fixed in r11569.

EDIT:
and r11570.

Navigation

[0] Message Index

[*] Previous page

Go to full version