[Gambas-user] How to reset a toolbar config?
B Bruen
bbruen at ...2308...
Mon Sep 1 02:41:09 CEST 2014
On Mon, 01 Sep 2014 01:29:43 +0200
Benoît Minisini <gambas at ...1...> wrote:
> Le 01/09/2014 01:06, B Bruen a écrit :
> > I have this recurring problem with the gb.form.mdi Toolbar. For some reason, unknown, I occasionally lose the project config file contents that describe the customised toolbar or those lines get "corrupted".
> >
> > The original config lines are:
> > [gb.form.mdi/Toolbars/tbrTasks]
> > Layout=["$lblFilter","taskfilter0","taskfilter.1","taskfilter.2","taskfilter.3","$lblSort","tasksort.0","$lblSearch","tasksearch.0","task.refresh"]
> >
> > The corrupted lines are:
> > [gb.form.mdi/Toolbars/tbrTasks]
> > Layout=["$lblFilter","taskfilter.1","$lblSort","$lblSearch","tasksearch.0"]
> >
> > My problem is that there appears to be no way to "reset" the toolbar in the IDE to get the original lines back. I have to manually edit the config file in an external editor.
> >
> > Is there a way to reset it in the IDE and I just can't find it?
> >
> >
> > tia
> > Bruce
> >
>
> There must be a bug somewhere in the IDE.
>
> Do you more information about when exactly the toolbar configuration is
> corrupted?
>
> Can you send the project?
>
> --
> Benoît Minisini
>
I don't think it's the IDE that corrupts it (as I don't think the IDE creates those config entries?) A couple of theories: maybe running the project through the IDE with debug and setting a custom toolbar layout? or maybe if the executable crashes after (and not related to) setting the custom layout? But I have not found a true cause as I don't notice the toolbar change until some time later.
The project is too big. I'll try to mock up something that shows it over the next week (I'll be away for a few days).
Other information:
1. The toolbar contains labels, menubuttons, toolbuttons, and a buttonbox. All have actions (except the labels of course) and it is interesting that the labels are always left in the config entry after the corruption happens and I always get one actioned item included and visible in the toolbar, but it has moved to the right hand end of the Layout line (as in the example above).
2. I am fairly sure that it only happens after I have "Configure"d the toolbar while the project is running. When does the runtime write that config out, when the configure popup is closed or after the project exits?
3. The actions are named by group and default position , e.g. "taskfilter.0" etc. This does not seem to be an issue though?
4. The Configure popup "Reset" button does not correct the layout after the corruption occurs. This, I suppose after thinking this through, is the real issue. How and where does the "Reset" button get its' layout information from? I would have thought that it goes back to the .form file?
B
--
B Bruen <bbruen at ...2308...>
More information about the User
mailing list