Author Topic: wxSmith development  (Read 174631 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxSmith development
« Reply #135 on: October 07, 2005, 05:37:23 pm »
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #136 on: October 09, 2005, 11:54:45 pm »
Hmmmmmmmm.... it seems very much like an uninitialized pointer... have you checked for "this" being nulll and such?

Whoops :oops:
I had lot of work to do this weekend and I must have missed something important  :(

EDIT: Bugs fixed :)
« Last Edit: October 10, 2005, 02:21:37 pm by byo »

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: wxSmith development
« Reply #137 on: October 27, 2005, 03:22:20 am »
I added a XRC Dialog, and here is the code produced.

Code
	//(*Initialize(XRCtest)
    wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
    FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
    Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
    Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
    Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
    //*)

Here is the error produced.  This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:

Code
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)

Any idea what can cause this?  BTW good job on the wxSmith.  It has some issues with repainting when dragging.  It changes the area to black.  Still good job.

jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #138 on: October 27, 2005, 07:50:59 am »
I added a XRC Dialog, and here is the code produced.

Code
	//(*Initialize(XRCtest)
    wxXmlResource::Get()->LoadDialog(this,parent,_T("XRCtest"));
    FlexGridSizer1 = XRCCTRL(*this,"",wxFlexGridSizer);
    Notebook1 = XRCCTRL(*this,"ID_NOTEBOOK1",wxNotebook);
    Panel3 = XRCCTRL(*this,"ID_PANEL3",wxPanel);
    Panel1 = XRCCTRL(*this,"ID_PANEL1",wxPanel);
    //*)

Here is the error produced.  This is a standard wxWidgets DLL app with RC2 & wxWidgets 2.6.x & winxp:

Code
xrctest.cpp:12: error: invalid static_cast from type `wxWindow*' to type `const wxFlexGridSizer*'
Process terminated with status 1 (0 minutes, 1 seconds)

Any idea what can cause this?  BTW good job on the wxSmith.  It has some issues with repainting when dragging.  It changes the area to black.  Still good job.

jmccay

Yop, I know this bug, Please select FlexGridSizer and unselect "Is Member" property and it should work fine :) I forgot to remove this bug before RC2  :oops:

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: wxSmith development
« Reply #139 on: October 28, 2005, 03:54:07 am »
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers".  I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.

jmccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #140 on: October 28, 2005, 02:51:53 pm »
I have created a page on the wiki under tutorials called "WxSmith Tutorial & Pointers".  I only filled in a pointer, but it's a good starting place for tutorial on using wxSmith.

jmccay

Thx for starting it :)

I've almost written wxSmith "Hello world tutorial" :). Maybe i'll fill empty Tutorial section :)

Offline MaikoID

  • Single posting newcomer
  • *
  • Posts: 9
Re: wxSmith development
« Reply #141 on: October 17, 2008, 04:01:01 am »
Hi,
Why "code completion" don't work with the "wxSmith" variables ?

when I put this

Code
.
.
.
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
StatusBar1. (don't show the properties of this object)
.
.
.

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: wxSmith development
« Reply #142 on: October 17, 2008, 08:46:32 am »
This is the wrong forum for this question, but ..

Your code is wrong, and so code completion cannot parse it.  When you enter

StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));

the correct reference is

StatusBar1->something

not

StatusBar1.something

Notice the pointer ref "->" rather than the direct ref "."

Ringo

Offline MaikoID

  • Single posting newcomer
  • *
  • Posts: 9
Re: wxSmith development
« Reply #143 on: October 17, 2008, 03:02:16 pm »
I know that, but not work with -> too.

It's very difficult to program with GUI interfaces, without these tricks.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #144 on: October 19, 2008, 11:26:58 pm »
I know about that problem. But I can not force reparsing of files in any way from plugin (I hope I'm wrong and somebody shows me the solution).

I work this way: I always keep the header file open, when I have to write some part of the code I press Ctrl+S (Save All) - this forces all files to be reparsed.

It's very difficult to program with GUI interfaces, without these tricks.

Hmm, maybe little bit harder than usual but I wouldn't label it "difficult". It's very useful and I like completion a lot but it may make you to lazy. Side effect: unfortunately more bugs and more time spent on finding them (that's real-life example).

Regards

   BYO

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: wxSmith development
« Reply #145 on: October 20, 2008, 06:42:11 am »
                                              In the name of God

hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?
(please also pay attention to the 2nd part of this post, may be it is a new idea that could be implemented in adoring wxsmith):)
=====
more details :
Quote
the only way to let the buttons and other stuff appear in this situation is to right click on the item and choose"send back" ,by using this method
when you run the application when you move your mouse cursor over a place that the item is located! by the time the mouse hovers on the item it shows up! meaning , that all of the items are invisible until you move the cursor over the object/item you have used in the form!
by the way please notice that , when you use "sendBack" on an item in this situation (using a bitmap as background of your application), you can not just click on that item easily! i mean for example you place a button on your form!(on a bitmap picture),and you send it back, then you want to add sth to the code specific to the button!(for example wana add  a new function or write Close(),what ever you like), wana double click on it and then expect seeing the source code page turned up! but to your surrprise nothing works again !(from properties pane, you cant use a new handler!i dont know Why!?!!)

i really would like o know the cause , and how to fix it if possible, and if there is noway for it now, i would really appreciate implementing such a functionality in WxSmith .

by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)
==================
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

and is it possible to merge an Object again , sth like a bitmap , a piece of picture to the wxpanel , so that it just doesn't get in way when adding buttons , and other wxstuff ? !

tanx 
« Last Edit: October 20, 2008, 03:19:05 pm by Master »
a man's dream is an index to his greatness...

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: wxSmith development
« Reply #146 on: October 22, 2008, 09:24:21 pm »
hi byo,

for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...

they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...

greetings from asturias

[attachment deleted by admin]
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #147 on: October 24, 2008, 11:24:55 pm »
hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?

Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:

Code
void SomeFrame::OnPaint(wxPaintEvent& event)
{
    wxPaintDC dc( this );
    dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}

Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).

Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)

wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.

Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.

And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".

BTW. Why this post is "in the name of God" ?

Regards
   BYO

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith development
« Reply #148 on: October 24, 2008, 11:25:30 pm »
hi byo,

for some time now i'm using some icons for the sizers which i made myself. i don't presume to be a great artist, but i think they work a little bit better than the original ones, better legible. the idea was that all sizer items and similar would be alike and clearly different from al the rest of the widgets icons. so i took up the red and made them all red, i gave them similar sizes, and some more changes...

they work fine for me, i attached them in a .rar , feel free to take a look at them and maybe use them as official ...

greetings from asturias

Thanks for the icons. They look better than mine you can expect them in the repository soon :)

BYO

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: wxSmith development
« Reply #149 on: October 26, 2008, 04:59:08 pm »
hello,  while working wth wxsmith,i bumped into a problem tha id like to consult with you guys .
why isnt it possible to add a bitmap picture as a background of app
in a wxpanel and meanwhile be able to add buttons,wxchoice and etc so that they be visible(they can be seen )!?
and why a bitmap button in this situation doesn't function!?

Hmm, you can do it it by adding handler for EVT_PAINT event. Let's say that you have bitmap in m_SomeBitmap variable, code similar to this should work:

Code
void SomeFrame::OnPaint(wxPaintEvent& event)
{
    wxPaintDC dc( this );
    dc.DrawBitmap( m_SomeBitmap, 0, 0, true );
}

Putting some bitmap button or anything else at the bottom is rather a workaround and trying to put one item on another causes strange effect on windows (for example items are drawn in one order but process mouse events in opposite).

Quote
by the way how is it possible to add our own custom menu bar !? again imagin i m planing to give my application a look and feel of Mac Os x under different OSes! how to achieve that ?

would you sth about this Option,;customized menu and theme , and Other stuff ?
(just let the user decide to use a default menu bar or no define its own bar, just like Microsoft Visual Studio , that you can do such a thing in a Properties pane of the Window!)

wxWidgets doesn't provide alternative to standard menus by default. There could be some some implementations somewhere on the net but I haven't seen that.

Quote
And also , is there any way to insert a flash object and make it function as button! lets say using a  flash button in wxsmith, sth just  like bitmap button! if not can you implement such a thing in adoring Wxsmith?

Do you mean the flash used in web sites? If so then quick answer: no. Even web browsers need plugins for this since decoding flash is a huge challenge.

And I would almost forgot. Thsi topic was related to development process of wxSmith, not developing using wxSmith. It should be posted somewhere in the "users forums".

BTW. Why this post is "in the name of God" ?

Regards
   BYO

tanx byo for your help , the reason , i posted such a thing here was that , i thought , they could be implemented in Wxsmith ! why ? cuz again i though they are a must have and you forgot to add them to the Wxsmith project !!
well by saying the flash buttons , i mean a button made using some flash button creation software such as Armada flash suit or adobe Flash Cs3!( i wonder if you saw KmPlayer, the latest version, it uses such buttons if think!), so that you can use them in your project !the  mouse hovers,and  it changes ! you know that !
(if again these things need to use plugins , tell me please! )

and That "In the name of God" it my habit !when ever im badly in need of sth and i hope everything goes ok , i start my work (rather start coding a new project or ask new stuff) with the name of God .

again Byo many tanx, and im sorry if my post was no related to this topic  , please consider them as some suggestion on improving Wxsmith! ( ive seen these stuff in VS, so i thought i could be a good idea to implement them in WxSmith too !)
a man's dream is an index to his greatness...