Rename a Form

Started by James Fuller, February 12, 2010, 07:59:11 AM

Previous topic - Next topic

James Fuller


If I rename a form in the properties window will it change the name in all the code or do I have to do a find/replace action in the code window?

I did a search but couldn't figure out how to bring up the particular topic I wanted to view?

James

Paul Squires

Renaming a form will not automatically change the name of all existing message handlers that exist in your code. This feature has been on the wish list for a while now... I just haven't implemented code for it yet.  :)
Paul Squires
PlanetSquires Software

Eddy Van Esch

Hi Paul,

I would like to pick up this thread again.
I have a project with multiple forms in full development. I need to rearrange and change some forms. In the process I would like to change the name of a form. Say I want to change the name of form TBMAIN into TBSTART
I was thinking. If I :
- do a Search and Replace from within FireFly changing TBMAIN into TBSTART in the "Entire Project". This will take care of all the handles, callback function names of the form and the controls.
- change the filename of the form TBMAIN.frm into TBSTART.frm
- in the *.ffp file do a Search and Replace changing TBMAIN into TBSTART.

Would that work or would that break some of FF's under-the-hood stuff for this project?

Kind regards

Eddy

Paul Squires

Hi Eddy - that process should work fine. BTW, FireFly does change the message handler names when the Form name changes. That was implemented some time ago (version 3.08, June 8, 2010).

Paul Squires
PlanetSquires Software

Eddy Van Esch

Thanks, Paul.
Quote from: TechSupport on October 23, 2013, 05:51:39 PM
FireFly does change the message handler names when the Form name changes.
But I assume that FF does not change the calls to those message handlers or control handles?
As in:

sTxt = FF_ListBox_GetText( HWND_TBMAIN_LISTBOXOUTPUT, i )
PostMessage HWND_TBMAIN, %WM_USER_SETFOCUS, HWND_TBMAIN_LISTBOXOUTPUT, 0

Kind regards
Eddy

Paul Squires

Hi Eddy, yes, you are correct. FF does not change those types of calls. It only changes the message handler itself.
Paul Squires
PlanetSquires Software

Eddy Van Esch

Thanks for confirming, Paul!

Kind regards
Eddy