Re: Serious bug with OBJECT SET SUBFORM

2017-12-17 Thread Keisuke Miyako via 4D_Tech
I am not sure if the behaviour is as dramatic (serious bug, fundamental bug) as 
you describe.
does it cause data corruption or a crash?

when an object method is executed,
the UI is generally not updated as each line of code is evaluated,
but rather, deferred until the method execution is complete.

internal properties such as enabled or disabled are updated immediately,
but the actual rendering of the object is not updated until the execution cycle 
becomes "idle/waiting event".

in your example, you call Get immediately after SET in the same method context.
so you didn't give time for the form to actually update itself.
had you called Get in the next form event, you would get the expected results.

of course, you could argue that "subform" is an internal property of the object,
so it should be updated immediately updated during the same form event.

but you must understand that there is an advantage in "lazy" or deferred 
rendering of the UI,
especially when the object is complex (listbox is another example).

procedural rendering may feel natural, but there is a cost to such 
implementation.

do you really need to call Get immediately after you used SET?

finally,

you can post a bug online (which will automatically issue an ACI* number)
or share your knowledge on this list or the forums,
and we appreciate your contribution,
but if you really feel strongly about a bug in 4D,
the best way to get it addressed is to talk to your local tech support.

https://bugs.4d.fr/index.htm

2017/12/18 7:46、LEONARD SOLONIUK via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
The documentation in the Language Reference and Design Reference do not specify 
any conditions under which this should fail. There is nothing in the 
Knowledgebase addressing this problem.
The only work-around is to use forms with hard-coded subform tables and names.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Menus and components

2017-12-17 Thread Keisuke Miyako via 4D_Tech
> The form was set in v14 to have an active menu bar, called “Main”. The 
> component doesn’t have a menu bar “Main” but each parent application does.

I am surprised that this even worked.

the documentation is quite clear that menu bars created vis the Tool Box Menu 
Editor are not shared,
so the activate menu bar of a component form can only be loaded from its own 
stock of menu bars.

if I needed a generic component dialog that "inherits" the host's menu bar,
I would call SET MENU BAR in the host context before calling the component's 
dialog method,
or else Get/SET the menu bar in the form's On Load event.

it simply feels wrong for a component to expect a specific menu bar name in its 
property list.
such implicit linkage, even if it worked, should be discouraged.
the active menu bar of a component should be a menu available locally, or else 
undefined.

if it "stopped working" then it sounds like a bug fix.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Serious bug with OBJECT SET SUBFORM

2017-12-17 Thread LEONARD SOLONIUK via 4D_Tech
It is always frustrating to spend days tracking down a bug and finding out that 
it is a fundamental 4D bug. I spent a week earlier this year tracking down a 
significant bug with OB SET  that was as reported with v16 R2 but as far as I 
can tell has not been fixed (ACI0096772).

Now a significant bug with OBJECT SET SUBFORM. A bug report has been made to 4D 
but I wanted to post it on the iNUG so that others could be warned. 


A subform object with the correct name is verified to exist. The following code 
shows that OBJECT SET SUBFORM does not work.

OBJECT SET 
SUBFORM(*;"ob_EventInput_Doc_Subform";[Documents];"Documents_Subform")  

OBJECT GET 
SUBFORM(*;"ob_EventInput_Doc_Subform";$ptr_SubformTable;$t_SubFormDetailName;$t_SubFormListName)
ASSERT($t_SubFormDetailName="Documents_Subform")

and the ASSERT always fails. ptr_SubformTable is Nil and t_SubFormListName is ""

This is being executed with the page of the form with the subform already 
selected as the current page. This fails with all variations of the Subform 
object properties: source, Detail form, Automatic Width, and Output Subform.

The documentation in the Language Reference and Design Reference do not specify 
any conditions under which this should fail. There is nothing in the 
Knowledgebase addressing this problem.

The only work-around is to use forms with hard-coded subform tables and names. 

Regards,
Leonard Soloniuk, MD


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Menus and components

2017-12-17 Thread Jeremy Roussak via 4D_Tech
Arnaud,

Your last line is the key: according to the documentation, nothing has changed, 
but when I run the code, everything has changed.

So it seems that if I want to have component display a form while keeping the 
host’s menus visible and working, I must create all the host’s menus using code 
rather than using the toolbox Menu editor.

Can that really be right?

Jeremy

Jeremy Roussak
j...@mac.com



> On 17 Dec 2017, at 19:13, Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 
>> Le 17 déc. 2017 à 20:01, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> I’m changing from v14 to v16 and am getting confused.
>> 
>> I have a component which is used in two applications. It displays and works 
>> with a multi-page form which is entirely self-contained. The form was set in 
>> v14 to have an active menu bar, called “Main”. The component doesn’t have a 
>> menu bar “Main” but each parent application does.[...]
> 
> Hi Jeremy, 
> it seems it depends on the host menubar "nature":
> 
> 
> in "Unshared objects"
>  Menus and menu bars created via the Menu editor
> 
> in "Shared objects"
>  Menus and menu bars using the ID returned by the Create menu command
> 
> But it does not explain the change, v14 and v16 docs seem identical about 
> this. 
> 
> -- 
> Arnaud de Montard 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Menus and components

2017-12-17 Thread Arnaud de Montard via 4D_Tech

> Le 17 déc. 2017 à 20:01, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I’m changing from v14 to v16 and am getting confused.
> 
> I have a component which is used in two applications. It displays and works 
> with a multi-page form which is entirely self-contained. The form was set in 
> v14 to have an active menu bar, called “Main”. The component doesn’t have a 
> menu bar “Main” but each parent application does.[...]

Hi Jeremy, 
it seems it depends on the host menubar "nature":


in "Unshared objects"
  Menus and menu bars created via the Menu editor

in "Shared objects"
  Menus and menu bars using the ID returned by the Create menu command

But it does not explain the change, v14 and v16 docs seem identical about this. 

-- 
Arnaud de Montard 


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Menus and components

2017-12-17 Thread Jeremy Roussak via 4D_Tech
I’m changing from v14 to v16 and am getting confused.

I have a component which is used in two applications. It displays and works 
with a multi-page form which is entirely self-contained. The form was set in 
v14 to have an active menu bar, called “Main”. The component doesn’t have a 
menu bar “Main” but each parent application does.

In v14, this worked fine. The form appeared, the menus (from the parent 
application) were present and they worked.

In v16, things have changed. The parent menu bar doesn’t appear; and if I make 
it appear, by supplying a callback routine in the parent which calls SET MENU 
BAR(“Main”), while the menu bar and its associated menus do appear, nothing 
happens when I select anything.

I’m obviously missing something very fundamental. Is what I want to do, namely 
use the parent’s menu bar, possible, or under v16 are selections executed in 
the component’s context rather than in the parent’s?

Jeremy


Jeremy Roussak
j...@mac.com



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

[MEETING] Montreal 4D Club Meeting

2017-12-17 Thread Thierry Daigneault via 4D_Tech
The next meeting of the Montreal 4D Club will be held Wednesday December 20th 
at 7 PM.

The schedule for the next meeting is as follows:
News
Questions
Presentations
- Open meeting. Bring your Xmas questions and presentations.
End of the meeting

We usually end up at some sort of restaurant after each meeting. Come and join 
us!



Address
---
254 Queen St, in Old Montreal, Quebec


Anyone can attend. Please note that the meetings are usually held in French.

If you need more information, you can check out our web page at:
http://www.macapa.com/4dmtl 

You can also write to our communications officer:
Thierry Daigneault: tdaignea...@macapa.com 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**