<?xml version="1.0" ?>

<kc>

<title>GNUe Traffic</title>

<editor contact="mailto:psu@burdonvale.co.uk">Peter Sullivan</editor>

<issue num="112" date="17 Apr 2006 00:00:00 -0800" />

<headquote>

</headquote>


<intro>
  This covers the three main mailing lists for the 
  <a href="http://www.gnuenterprise.org">GNU Enterprise</a> 
  project, plus the #gnuenterprise IRC channel.
</intro>


<section 
   title="Designer for Forms and Application Server"
   subject="[IRC] 12 Apr 2006"
   archive="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-12"
   author="Peter Sullivan" 
   contact="mailto:psu@burdonvale.co.uk" 
   startdate="12 Apr 2006 12:00:00 -0800"
   enddate="12 Apr 2006 12:00:00 -0800">

<topic>Designer</topic>
<topic>Forms</topic>
<topic>Application Server</topic>

<p>Jan Ischebeck (siesel) asked <quote who="Jan Ischebeck">how 
is designer improving?</quote> Jason Cater (jcater) said 
<quote who="Jason Cater">it requires wx2.6 now - so the first 
change was getting it stable on 2.6. Then I stopped using GNUe 
Form's ui drivers to draw widgets in real-time on the layout 
canvas - I now draw my own objects on my own canvas object - 
this gave me a tremendous amount of control over the canvas - 
so things &quot;just work&quot; on it now - like rubberband 
boxes, etc. I also reworked the property editor - which as it 
turns out - was solely responsible for the 2+ second delay
between clicking on a widget, and having designer actually 
select that widget. Actually, that will be the extent of the 
changes before I declare designer &quot;stable&quot; again - 
but there's a lot of under the hood cleaning (comments, better 
variable naming, etc)</quote>.</p>

<p>Jan said that he was <quote who="Jan Ischebeck">thinking how 
to enable designer to create appserver designs</quote>, alongside 
its current role as a designer for Forms and Reports. Jason 
said he definantly wanted <quote who="Jason Cater">to tackle that 
after I get forms support stable again</quote> but he had not 
given much thought to how an Appserver Designer would actually 
work yet - it needed to be a tool for end users who were 
not programmers but who understood the business process they 
were trying to model.</p>

<p>For the current (Forms-related) version of Designer, Jason 
was <quote who="Jason Cater">not *that* far away from wanting 
alpha testers - if I can get in a couple of solid days of programming, 
I think it'd be where I want it at</quote>.</p>

</section>


<section 
   title="Requerying on a commit in Forms"
   subject="[IRC] 12 Apr 2006"
   archive="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-12"
   author="Peter Sullivan" 
   contact="mailto:psu@burdonvale.co.uk" 
   startdate="12 Apr 2006 12:00:00 -0800"
   enddate="14 Apr 2006 12:00:00 -0800">

<topic>Forms</topic>

<mention>Bajusz Tam&#0225;s</mention>

<p>Referring back to 
<kcref title="Behaviour of Clear button" subject="[IRC] 05 Apr 2006" />, 
Reinhard M&#252;ller (reinhard) noted the consensus that 
<quote who="Reinhard M&#252;ller">it would be logical if after a commit the 
complete result set would be queried again</quote>, but added several 
further issues: <quote who="Reinhard M&#252;ller">1. actually the 
starting point was the &quot;undo&quot; function (that we 
came up with a different name afterwards), that this function should do the 
query again - it was me who extrapolated that to the commit - is this really 
desired to after commit see changes done by different users? and 2. doing the 
complete query again after commit would mean newly inserted records being 
sorted to the place they belong instead of the place they were originally 
inserted, so it would look to the user as if the record &quot;jumped&quot; 
to a different place</quote>. Also, <quote who="Reinhard M&#252;ller">3. what 
about those records that were inserted or changed in a way that they don't 
match the query? would they disappear after the commit?</quote>.</p>

<p>Jason Cater (jcater) noted that <quote who="Jason Cater">the last query 
is already saved</quote> since <quote who="Jason Cater">if you press the 
&quot;Query&quot; button twice, the previous query is brought back 
up</quote>, so users could re-run the query manually to see what had 
changed if they wanted to. On the more general issue, 
<quote who="Jason Cater">my personal feeling is in several key forms, my 
users will get disoriented if the resultset changes on them - but I can 
see where it would be useful/desirable too. Certainly it wouldn't be hard 
to add a requery-on-commit attribute to datasources or blocks (is there 
not one now?). But even then, the question becomes &quot;what is the 
default?&quot;</quote>.</p>

<p>James Thompson (jamest) said <quote who="James Thompson">what's the 
advantage to the requery of the whole result set? (other than it would make 
our record tracking and removal code go away :)</quote> But Jason was not 
sure of this last point - <quote who="Jason Cater">as even on requery, 
wouldn't you want it to still try to make a best-effort to go back to the 
same record</quote>? Reinhard said that the 
<quote who="Reinhard M&#252;ller">advantage would be that you see other records 
that other users have added meanwhile - or changes from other users - 
(current requery logic only requeries those records that had changes on 
commit)</quote>. James wondered <quote who="James Thompson">if that 
shouldn't be a separate feature - like in postgresql's case it allows 
you to register for notifications of table updates</quote>.</p>

<p>Reinhard was <quote who="Reinhard M&#252;ller">also interested in what you 
think about this &quot;revert&quot; function: should it revert to the 
original state of the db, or should it fetch changes from other transactions?
I think new records popping up on revert might not disorient as much as it 
would on commit</quote> but worried <quote who="Reinhard M&#252;ller">*sigh* 
why does it happen so often that I start implementing something and after 
that, I find out that I'm not even sure what exactly I want to 
implement...</quote>..</p>

<p><a href="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-14">Two 
days later</a>, Bajusz Tam&#0225;s (btami) explained that some of his users 
were having problems adjusting to using a legacy application, now 
translated to use GNUe Forms, because of the behaviour of the 'Clear' 
button. The 'clear' button threw away all changes since the last 
commit, not just on the current record. Also, it did not 
re-query the data, leaving the user looking at a blank form. 
Reinhard M&#252;ller (reinhard) noted that 
<quote who="Reinhard M&#252;ller">both issues are actually related 
to the &quot;undo&quot; function, and not to commit in any 
way</quote>. This meant that the behaviour of commit could 
stay as it was as of time of writing, avoiding some of the 
potential problems previously discussed. The main outstanding 
issue was whether the 'undo' function should 
<quote who="Reinhard M&#252;ller">revert to the state of the result 
set before any change was made - or should it refresh data 
from the backend - risking that, for example, the current 
record suddenly disappears because another user has just 
deleted it - or records &quot;jumping around&quot; because 
somebody changed a record in a way relevant for the sort 
order</quote>.</p>

</section>


<section 
   title="Menu tags and triggers within Forms"
   subject="[IRC] 13 Apr 2006"
   archive="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-13"
   author="Peter Sullivan" 
   contact="mailto:psu@burdonvale.co.uk" 
   startdate="13 Apr 2006 12:00:00 -0800"
   enddate="13 Apr 2006 12:00:00 -0800">

<topic>Forms</topic>

<p>Reinhard M&#252;ller (reinhard) noted that the &lt;menu&gt; tag 
<quote who="Reinhard M&#252;ller">seems to fulfill both fuctions: menu 
and menuitem - is that on purpose?</quote> James Thompson 
(jamest) confessed <quote who="James Thompson">not a lot was 
done in menus beyond playing around - there is a pretty complete 
dynamic menu system in designer fwiw - that I was going to rip out 
and put into common to replace the stuff started there</quote>.
Reinhard looked at this, and noted that it <quote who="Reinhard M&#252;ller">seems 
to deal with the UI creation for the menu - which leads to the question
- does the menu handling actually belong to common or to forms?</quote>
James thought that <quote who="James Thompson">the toolbar and menu 
logic for setting up menus belongs in common</quote>, or even in 
his new, proposed, GNUe Application Platform (GAP), as discussed in 
<kcref title="GNUe Application Platform to replace Navigator?" subject="[IRC] 27 Mar 2006" /> - 
<quote who="James Thompson">as it should be the same code in all 
our gui apps</quote>. It had been a while since he had looked at 
this code, but <quote who="James Thompson">i think the addFoo methods 
built a in memory representation of a menu - and then the finialize 
method mapped it to the UI widget set. what I was hoping for in common 
was a set of classes/methods that let us build a logical menu in 
memory</quote>. Just like a GNUe form definition, this would not 
be specific to any particular user interface. The idea would be that 
<quote who="James Thompson">the UI would register to listen for menu 
update events</quote>, thus completely isolating the menu logic from 
whatever user interface the user happened to be using.</p>

<p>Reinhard asked whether this would also apply to the 'standard' 
menu items that were actually part of the base Forms application, as well 
as to additional menu items defined by a forms developer. James 
thought so - this would mean that <quote who="James Thompson">1) a form 
could extend a menu or remove items or hide them via startup triggers 
- 2) it may be possible for an application like navigator to adjust 
it's menu dynamically based upon the forms loaded in memory</quote>. 
Reinhard understood - the issue then was whether to implement this as 
UI events or as function calls by the menu code - 
<quote who="Reinhard M&#252;ller">my experience 
so far is that events add complexity and eat performance</quote>. 
James agreed, and although he had been thinking originally in terms 
of events, could see no reason not to do this as function calls 
instead.</p>

<p>Reinhard liked James' idea of allowing triggers to be switched 
on and off. Jason Cater (jcater) wondered what should then 
happen <quote who="Jason Cater">if a disabled trigger is called
- does it just not run? - throw an exception?</quote> He felt the 
latter option might be better - it represented 
<quote who="Jason Cater">a developer error</quote>. James suggested
<quote who="James Thompson">you could flip optional processing 
on/off via a checkbox on a form via a trigger disabling another named 
trigger</quote>. Reinhard felt this was bad style - it was better 
to keep the trigger active, but make it 
<quote who="Reinhard M&#252;ller">check the value of the check box in the 
trigger code</quote> and simply do nothing if that was what was 
required.</p>

<p>Later, Reinhard added <quote who="Reinhard M&#252;ller">the more I 
think about menus and toolbars, the more I see them bound rather 
tightly to triggers - they will fire triggers, they will follow 
trigger's enabling/disabling ... they might even get label and help 
text from triggers (so a menu item and its corresponding toolbar 
button will get the same label/tooltip). So I'm starting to think if 
implementation of GMenu, GMenuItem and GToolButton would feel well 
in the logic/ subdirectory</quote>. Jason noted that 
<quote who="Jason Cater">fwiw, this is how designer does it - 
and how I was moving forms to do it</quote>. And user interface 
systems such as QT did something similar - 
<quote who="Jason Cater">except they all have &quot;Events&quot; 
instead of &quot;Triggers&quot;</quote> - <quote who="Jason Cater">so 
I think having one object that represents any type of such 
&quot;action&quot; makes sense</quote>. This would also automatically 
handle the different ways of selecting something in a typical graphical 
user interface - pressing a hot key, selecting a menu option or 
clicking a toolbar icon <quote who="Jason Cater">are all the same 
object - my only concern is are we overloading triggers too 
much</quote>. In particular, all of the GNUe Tools had the 
concept of triggers, but this more specific use of them 
<quote who="Jason Cater">for the menu/toolbar/ui stuff</quote>
really only made sense in <quote who="Jason Cater">forms (and maybe 
navigator)</quote>.</p>

<p>Jason and Reinhard swapped some sample XML to try to clarify 
what they each meant. Jason suggested <quote who="Jason Cater">what 
I now wish we had done (and might could still do without any 
breakage)</quote> was that triggers could just be stand-alone pieces 
of python code with a name, which could be called either by another 
trigger bound to an object (what GNUe had, up until now, considered a 
trigger) or called by an action. This would simplify Reinhard's 
suggested treatment of menu items, in that these would just be a 
specific type of action. </p>

<p>Reinhard set out the options - either <quote who="Reinhard M&#252;ller">a) 
a menu item has an ON-ACTIVATE trigger that is 
fired when the item is clicked, and that trigger is just a trigger 
like all other triggers, or b) there are &lt;action&gt;s, and a menu 
item is bound to an action, and gets info like icon, label, help text 
from that action element, and an action is, while in implementation 
closely related to a trigger, something completely different in 
philosophy. The more I think about it the more it seems to me these 
are diametral concepts.</quote>. Jason liked this 
second option - <quote who="Jason Cater">it seems like a clean 
distiction as far as the definition of our markup</quote>.</p>

</section>

<section 
   title="Forms approaching version 1.0?"
   subject="[IRC] 13 Apr 2006"
   archive="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-13"
   author="Peter Sullivan" 
   contact="mailto:psu@burdonvale.co.uk" 
   startdate="13 Apr 2006 12:00:00 -0800"
   enddate="13 Apr 2006 12:00:00 -0800">

<topic>Forms</topic>

<p>Jason Cater (jcater) asked <quote who="Jason Cater">how far are we 
featurewise from considering a 1.0 release</quote> for GNUe Forms. 
<quote who="Jason Cater">I only ask because I see so many projects 
where our 0.6 is comparable to their 1.6 or even 2.6</quote>. This 
made no difference to him, but it maybe affected 
others' willingness to use GNUe. Reinhard M&#252;ller (reinhard) 
said <quote who="Reinhard M&#252;ller">there is one psychological thing 
here for me - as long as we are 0.x I feel like having the right to 
break compatibility - as soon as we are 1.0 I think we morally have 
the obligation to stay compatible with every single feature or 
misfeature that is in the code. I seriously would like to see a 0.9 
or comparable being in use for > 6 months without much happening - so 
we know it's stable enough</quote>, both in terms of bugs and in 
terms of not needing new features that would break 
backward-compatability.</p>

</section>


<section 
   title="Trigger namespace in Forms"
   subject="[IRC] 14 Apr 2006"
   archive="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-14"
   author="Peter Sullivan" 
   contact="mailto:psu@burdonvale.co.uk" 
   startdate="14 Apr 2006 12:00:00 -0800"
   enddate="15 Apr 2006 12:00:00 -0800">

<topic>Forms</topic>

<p>Reinhard M&#252;ller (reinhard) noted that 
<quote who="Reinhard M&#252;ller">each object in the trigger 
namespace has a _parent property - do you make use of that 
in any way?</quote> James Thompson (jamest) said that he 
did not use this when coding his triggers - 
<quote who="James Thompson">i believe i always use absolute 
reference from form</quote> in the format 
<quote who="James Thompson">form.block.field</quote>. 
Reinhard also asked <quote who="Reinhard M&#252;ller">I 
figure that you also don't make use of the _object property 
of trigger objects that let you directly access the GObj 
object that should actually be hidden behind it</quote>. 
James confirmed this - he personally had never 
been keen on this, but it had been <quote who="James Thompson">added 
for papo folks</quote>, as previously discussed in several threads, including 
<kcref title="Project PAPO and GNUe" subject="[IRC] 02 Jan 2003" />.
</p>

<p>James explained that <quote who="James Thompson">i see the trigger 
namespace as ideally being a restricted python environment with 
control over imports</quote>, with code for triggers 
<quote who="James Thompson">having no access to the GObjs, only to 
instances of the class that implements the namespace representation 
of that object in the trigger</quote>. He added 
<quote who="James Thompson">there is a class that maps a var name 
in the trigger to an object - and controlls access to that object 
via the exposed properties - methods, etc</quote>. Reinhard 
identified this as <quote who="Reinhard M&#252;ller">GObjNamespace - 
exactly the class I'm cleaning up</quote> as of time of writing - 
<quote who="Reinhard M&#252;ller">thus all these questions</quote>.</p>

<p><a href="http://www.gnuenterprise.org/irc-logs/gnue-public.log.2006-04-15">The 
next day</a>, Reinhard noted that, previously, <quote who="Reinhard M&#252;ller">any 
trigger got a copy of the __dict__ of the &quot;self&quot; object into its local 
namespace - so for a block trigger, you could do either self.firstRecord() or 
just firstRecord(). I removed that as I considered it a bug, but now I'm not 
sure if it is wanted behaviour. In any case I don't like it very much as it 
allows for sloppy programming - and it will most probably hurt the &quot;support 
for self in named triggers&quot; todo item. Anyway, if anybody knows some 
background why this was done, I'd be happy to know :)</quote></p>

</section>


</kc>