Re: 4DMethod meeting Xojo/4D files updated (John Baughman)

2018-04-27 Thread truegold via 4D_Tech
Hey John,

>  11. 4DMethod meeting Xojo/4D files updated (John Baughman)

Thank you!

That was a cool demonstration of another front end WEB UI with 4D as a backend.

I didn’t know but now I do. I didn’t now that XoJo handles Mac, windows, linux, 
iOS, etc.

If anyone missed may I suggest spending an hour in review and see what John has 
presented. Not to mention the example demo db!

Really good stuff!

Very much appreciate,
John…

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

Re: Equivalent of FORM GOTO SUBFORM PAGE

2018-04-08 Thread truegold via 4D_Tech
Hi,

>> you can call FORM GOTO PAGE with an asterisk option 
>> http://doc.4d.com/4Dv15/4D/15.5/FORM-GOTO-PAGE.301-3577151.en.html”

Ah yes, this was mentioned to me some time ago and I had completely forgotten.

Thanks, that was so simple!

John…


> Hi All,
> 
> Might be a good time to revisit this issue I had some time back. well and 
> actually I have a need for it to work once again.
> 
> Scenario: I have a parent form which has a single subform container. This 
> container is set via code to a subform where I do edits of various kinds. 
> There are two pages of this subform (previously had two different subforms 
> but these are too similar).
> 
> When this parent form is opened I want this subform to change to either page 
> one or page two based upon a condition.
> 
> My questions are:
> 
> 1. Can a subform (within a subform container) have multiple pages that can be 
> switched to via code?
> 
> 2. If the answer is yes, then where do I tell this subform to change it’s 
> page.
> 
> 3. Since FORM GOTO PAGE seems to only work with the parent form do we have 
> the equivalent of FORM GOTO SUBFORM PAGE ?
> 
> Seems like we need something like this to work.
> 
> I’ve tried many different combinations of “CALL SUBFORM CONTAINER” and/or 
> “EXECUTE METHOD IN SUBFORM” but the code fires but the parent form always 
> changes page.
> 
> Anyone know how to deal with this?
> 
> Appreciate,
> John...

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

Equivalent of FORM GOTO SUBFORM PAGE

2018-04-07 Thread truegold via 4D_Tech
Hi All,

Might be a good time to revisit this issue I had some time back. well and 
actually I have a need for it to work once again.

Scenario: I have a parent form which has a single subform container. This 
container is set via code to a subform where I do edits of various kinds. There 
are two pages of this subform (previously had two different subforms but these 
are too similar).

When this parent form is opened I want this subform to change to either page 
one or page two based upon a condition.

My questions are:

1. Can a subform (within a subform container) have multiple pages that can be 
switched to via code?

2. If the answer is yes, then where do I tell this subform to change it’s page.

3. Since FORM GOTO PAGE seems to only work with the parent form do we have the 
equivalent of FORM GOTO SUBFORM PAGE ?

Seems like we need something like this to work.

I’ve tried many different combinations of “CALL SUBFORM CONTAINER” and/or 
“EXECUTE METHOD IN SUBFORM” but the code fires but the parent form always 
changes page.

Anyone know how to deal with this?

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

Re: Find and Replace Component for 4D Write Pro

2018-03-07 Thread truegold via 4D_Tech
Hey Jeff,

Simple! Cool UI trick as well.

Works with v16R4 as well.

Thanks much,
John…



> I had the need to add find and replace to my 4D Write Pro areas. So I created 
> a generic component. It easily shows and hides itself at the top of a Write 
> Pro area and can resize itself automatically. You can download it and a demo 
> at:
> 
> http://www.successware.net/downloads/4d-components/FindAndReplace.zip
> 
> It requires 4D v16R5. You are free to use and modify it in any way you wish. 
> See the accompanying MIT license.

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

Re: [SAD NEWS] legendary developer and 4D base-rock Ortwin Zillgen

2018-02-27 Thread truegold via 4D_Tech
Hi All,

OMG! I was just working with Ortwin last week.

I’m in shock. We have lost a very talented and gifted developer.

Thanks for letting us know.

Sadly,
John…



> Fellow 4D developers,
> 
> it is with great sadness, that I have to inform you, that Ortwin Zillgen has 
> passed away end of last week.
> Suddenly, unexpectedly and far to early at the young age of 64.
> 
> Ortwin was known to many of us for his interesting and innovative ideas for 
> interfaces, anything to do with cartography and mastery of subforms, his 
> garish striped shirts and baggy yellow jacket, but most of all, as an 
> all-around great guy to hang out with and

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

Re: Javascript Calendar in Web Area

2018-02-12 Thread truegold via 4D_Tech
Hey Julio,

> I agree with Tom’s recommendations, try to pick a framework of your choice 
> that does include a Calendar widget. I’m also a big fan of Kendo UI. I’ve 
> been using their jQuery version but I’m now in the process of migrating to 
> their Angular version.

Thanks so for the confirmation.

I have played around with JQuery on a client’s website. But never used it or 
any of the JS frameworks within a web area. SO new territory.

Appreciate the feedback,
John…


**
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: Javascript Calendar in Web Area (Tom DeMeo)

2018-02-12 Thread truegold via 4D_Tech
Hey Tom,

> I would recommend that choosing a Calendar is less important than choosing a 
> web UI/datasource framework (which would include a Calendar solution) and 
> using it whenever you have a choice.


Yes that’s a broader way of thinking about it.

> Ref: I’d go shopping for a web UI toolkit and stick with it. .. Kendo UI


Ok, I’ll give it a good look.

And appreciate the reminder about the 4D commands to help get the job done.

Appreciate,
John…

 
**
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
**

Javascript Calendar in Web Area

2018-02-08 Thread truegold via 4D_Tech
Hi All,

I am redesigning an internal invoicing tool I use which has a calendar module. 
So I thought, “hey, why not use one of those Javascript Calendar in a web area”?

I’m still in the early stages of understanding how to get data into and get 
data out of a web area. So…

Has anyone used a javascript library (I’m looking at FullCalendar 3.8.2) for 
implementing a calendar (Monthly, weekly, daily) in a web area? One where you 
can add to and modify as needed with data syncing into the 4D database?

Any recent/current examples?

Psss. I’d look at Google Mail but I want the calendar interface to work 
completely offline.

Appreciate,
John…

**
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: How to fix Design windows closing after quiting 4D

2018-01-21 Thread truegold via 4D_Tech
Hi John

> Are you on Windows?  On the Mac with 16 R series windows do not reopen no 
> matter how you get to Design. Not the case on Windows where previously open 
> windows reopen as expected as long as the alt key is not down. At least that 
> is my experience. 

On Mac!

It was working in earlier versions of v16 but I can’t recall which since I 
removed what I didn’t need from the computer. After the upgrade to v16 R4 I 
fought with it for I’m sure a week or more before I got frustrated one day.

Anyway, it is what it is.

Appreciate,
John…


**
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: How to fix Design windows closing after quiting 4D

2018-01-21 Thread truegold via 4D_Tech
Hey Ortwin,

In R2 it worked and then in R4 it didn’t.

So…

I can’t recall the last time I had to try and remember any key sequences. There 
was a v14 r v15 (I can’t recall) where it was an issue. But then it was quickly 
fixed. Not sure what they changed in Design but ti broke the memory!

John...

> just in case
> - option-/alt-key pressed when accessing design closes all windows
> - in runtime I click option-/alt-key to launch the context-menu to access 
> design
> - before releasing the Goto Design-command, I get my hands off the 
> option-/alt-key
> - if I didn't, all windows are closed, if I did, I'm back to where I last 
> had been working
> Works fine, V15, V16 with and without R.

**
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: How to fix Design windows closing after quiting 4D

2018-01-19 Thread truegold via 4D_Tech
Hi Miyako,

Once you use new features you really can’t go back!

Additionally, why would something as pedestrian as remembering and reopening 
windows in Design be such a chore? I don't understand it!

I’ve resorted to a method where I keep track of what forms and methods I had 
open.

Uggghhh!

John...

> R releases are not always patched at the exact same time as dot-releases.
> 
> in particular they need to be tested in production for several weeks prior to 
> official release.
> 
>> When we are getting closer to a public minor release shipment, the branch is 
>> frozen – usually for a 3- to 5-week period.
> 
> 
> http://www.4d.com/products/r-release/faq.html
> 

**
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
**

How to fix Design windows closing after quiting 4D

2018-01-17 Thread truegold via 4D_Tech
Hi All,

OSX Mac 4D 16 R4

I seems to recall this issue popped up previously but I couldn’t find it in the 
NUG.

So I’m working and I have various method and form windows open in Design. Then 
I quit and restart later …

And when I get back into Design all my windows are closed.

So something is not getting set or saved or???

However, if I close the database while in Design and reopen it then the windows 
are still there.

So???

Anyone know how to fix so that my windows remain open after I quite 4D?

Appreciate,
John…


**
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: Programmatically Manage Parent Tab an Multi-Subforms

2017-12-26 Thread truegold via 4D_Tech
Hey Miyako

> I may be missing some critical elements of your design, but given the basic 
> construct of a tab control parent and a subform child:
> 
> - I would remove "goto page" as the tab control's standard action and keep 
> the parent on page 1 at all times.
> - I would either use the same process variable for the tab and subform, or 
> else execute subform:=subform in the tab's object method.
> - I would use a single subform with multiple pages rather than switch 
> subforms.
> - I would centralise code to switch pages in the subform's on bound variable 
> change event.
> - I would refrain from using GOTO PAGE(*) and adhere to the data change/bound 
> variable change model as much as possible.

My instinct wants to keep the pages as separate subforms as I like how it works 
(well prior to this issue). But I am willing to reconsider moving all the pages 
into a single form and try it and see.

If I went that way then I would’t need a container to manage swapping the 
subforms as there would only be a single subform. I could have that directly 
placed upon the parent form.

I think I will take a few more days off and when I return look at it with fresh 
eyes.

Appreciate,
John…
**
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: Programmatically Manage Parent Tab an Multi-Subforms

2017-12-26 Thread truegold via 4D_Tech
Hey Kirk,

Note: This design has been in place an evolving for several years now. A 
further requirement brought the issue to light.

> The only other way I've been able to accomplish what you want to do is with
> nested EMIS calls … It works. And it's ugly.

Well I was hoping for simple and elegant and beautiful! 

> I would encourage taking a step back and look at the whole task, or set of
> tasks, you're trying to accomplish and seeing if nested subforms is really
> the best solution.

Yes I am currently in process of doing that. This is not the property editor 
subforms that I have working quite well. It’s much simpler than that. But I am 
willing to reconsider now that the design need have evolved and changed. I 
could just remove the subform container and have a single subform with multiple 
pages and see how that works. But I do like having a separate swappable subform 
to model the behavior I need.

As to the data that’s not really relevant although - as you might remember - I 
do have a similar approach with a single form method, aka, pseudo class with 
all behavior, and I use an object with embedded objects for what I need data 
wise.

> This doesn't directly solve the problem you have at the moment but you
> could use SET TIMER in the subform (according to the docs SET TIMER is
> scoped to the subform) …

I tried playing around with Set Timer and couldn’t get it working either.

I think I will take a few more days off and when I return look at it with fresh 
eyes.

Appreciate,
John…

**
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: Programmatically Manage Parent Tab an Multi-Subforms

2017-12-26 Thread truegold via 4D_Tech
Hi Spenser,

> old school is draw two subfoms. one off screen. then swap as needed. with 
> move-object. works a charm ;)

Well I’m thinking I can get this working without resorting to an "old school” 
approach. The need is s simple!

I am in 4D 16r5 and I like the simplicity and elegance of subforms.

So we’ll see if I can get it working.

Appreciate the thought though,
John…


**
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
**

Programmatically Manage Parent Tab an Multi-Subforms

2017-12-24 Thread truegold via 4D_Tech
Hi All,

I have a parent form which has a subform container. Above the subform container 
is a tab control object (5 tabs). Clicking on a tab selects the tab an triggers 
(underlying code) a change to the underlying subform. Works great.

But I discovered I need one of the subform pages, let’s call it “Edits”, to 
change, based upon a different context, to either a different page or a 
different subform using code. The key here is that some action in the parent 
form needs to cause the subform container to display a different form.

Seems easy… But I haven’t been able to get it to work.

Parent Form (Tab control)
   -> Subform container
  -> actual subform

Logically it seems that I need to programmatically set the correct tab and tell 
the subform container to change the subform displayed. And then, of course, 
have the subform appear in the subform container.

At the point where I need things to happen I’m not in a subform so I can’t use 
CALL SUBFORM CONTAINER. I can’t use EXECUTE METHOD IN SUBFORM because I am at 
the parent level. Well if I had a multi-page subform then I might need to use 
the command.

I’ve tried many variations over the last few days. So… I am sure that not 
having a clear understanding of what I am doing is contributing to my hit and 
miss approach not working.

So what’s the secret sauce to manage programmatically the subform change 
(parent level)?

Can someone point to where my understanding is off? Or other ideas?

Appreciate,
John…

**
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
**

Ref: Resize SVG_Use

2017-12-06 Thread truegold via 4D_Tech
Hi Miyako,

I think if the image size were uniform in the document I could do that. But the 
same images can be size to different sizes in different parts of the svg doc.

I might just decide to keep things as they were and laid an image as I need it. 
The worst case is that the same image is loaded many times and I cannot use 
SVG_USE.

Thanks,
John...


> it depends on the document,
> but I would create a group in "defs" and apply the scaling and/or translation 
> factor at the "defs" level.
> 
> you can "use" a "g" in SVG.
> 
> 2017/12/06 10:56、truegold via 4D_Tech 
> <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> のメール:
> Are you say that I need to wrap each occurrence of the SVG_Use within a group 
> ?

**
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
**

Ref: Resize SVG_Use

2017-12-05 Thread truegold via 4D_Tech
Hey Miyako,

> hurts your brain, doesn't it?

Ah a joke! And yes it’s never quite as simple as it seems. Change one thing and 
effects things downstream. But it does appear hat the svg is working as it’s 
designed to. I’m just not quite skilled enough yet.

> by the way,
> your SVG is not wrong,
> but the standard practice is to wrap the element in a  and add the 
> translate attribute to the group,
> as opposed to the graphic element itself.

Anyway, I have learned via many web examples that wrapping in a  is the 
suggested strategy.

A question please? following the technique you showed me to load the images as 
refs:

$defs:=SVG_Define_symbol ($domSvg_ptr->;"defs") to group all the 

Loop…
$symbol:=DOM Create XML 
element($defs;"image";"id";$name;"xlink:href";$image;"x";0;"y";0;"width";$width;"height";$height)
   
And then to access in later places in code:

$glyph:=SVG_Use ($domSvg_ptr->;$whichAspect;0;0;0;0) 

And here are hundred of them in this svg document.

Are you say that I need to wrap each occurrence of the SVG_Use within a group 
?

Thanks,
John…


> From: Keisuke Miyako <keisuke.miy...@4d.com>
> Subject: Re: Ref: Resize SVG_Use
> Date: December 5, 2017 at 5:08:16 PM PST
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> 
> 
> this is an SVG question, not a 4D question, but the answer is "yes".
> 
> if you change the scale in transform then it applies to the coordinates you 
> pass to translate and rotate.
> it also inherits the scaling resulting from scaling on parent elements as 
> well as the viewBox/viewPort ratio at the top level.
> 
> hurts your brain, doesn't it?
> 
> by the way,
> your SVG is not wrong,
> but the standard practice is to wrap the element in a  and add the 
> translate attribute to the group,
> as opposed to the graphic element itself.
> 
> 2017/12/05 9:51、truegold via 4D_Tech 
> <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> のメール:
> Does the SVG_SET_TRANSFORM_SCALE  change the image size and also the the area 
> size? In others words (even though the xml in the 4D SVG Viewer doesn’t show 
> it) is 500 pixel width still 500 pixels after the size transform? Or is 500 * 
> scale?

**
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
**

Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi,

Does the SVG_SET_TRANSFORM_SCALE  change the image size and also the the area 
size? In others words (even though the xml in the 4D SVG Viewer doesn’t show 
it) is 500 pixel width still 500 pixels after the size transform? Or is 500 * 
scale?

I'm asking because as soon as I change the scale then the x and y begins 
shifting in the picture.

When the scale is 1 things move and align pretty well.

When the scale is .90 then the image shifts to the left and top as the image 
also shrinks

When the scale is .75 (and so on) then the image shifts to the left and top as 
the image also shrinks.

Perhaps that is the problem and I have a setting that needs t be set 
differently?

Thanks,
John...


> Hi,
> 
> As an aside I am testing in a small sample and opening inn the viewer.
> 
> if I use this line:
> 
> SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)
> 
> it works great! Starts the draw exactly at the x and y.
> 
> But if I add this line:
> 
> SVG_SET_TRANSFORM_SCALE ($glyph;$_w/$width;$_w/$height)
> 
> Then it goes from it’s correct location and jumps to the 0,0 origin I think..
> 
> BTW, I am using 4D v16R4 if that matters.
> 
> Maybe there’s a better ay to scale? I need to to scale the images based upon 
> their original size (width, height) down to what ever the end users selects. 
> Usually (in pixels) 14, 16, 18, 20, 24, 28, etc. These need to transform 
> based upon the original width and height (usually close to 1000) to a small 
> percentage.
> 
> Is there another way? A better way?
> 
> Thanks,
> John…
> 
> 
> 
>> Hi Miyako,
>> 
>>> translate offsets the x/y by the value specified. 
>>> the x/y you pass are not absolute coordinates (unless, of course, the x/y 
>>> in element are 0,0) 
>> 
>> Agree!
>> 
>> I have tested setting the x/y w/h to 0 thinking that it would apply 
>> correctly but the svg looks like this:
>> 
>> > x="0" xlink:href="#S09" y="0”/>
>> 
>> and the image seems to be at x=0, y=0 even though the size seems to be 
>> correct? Always!
>> 
>> Thanks,
>> John…
>> 
>> 
>>> Hi All,
>>> 
>>> Note: If I apply the transform immediately after I create the symbol:
>>> 
>>> $symbol:=DOM Create XML 
>>> element($defs;"image";"id";$name;"xlink:href";$image;"x";0;"y";0;"width";$width;"height";$height)
>>>
>>> SVG_SET_TRANSFORM_SCALE ($symbol;18/$width;18/$height)
>>> 
>>> That seems to work and would be fine if all I needed were uniform sizes in 
>>> the doc. In this example I am resizing them so they are 18 by 18 pixels. 
>>> But as indicated previously the end user can set a size property to enlarge 
>>> or shrink these sizes for the same symbol in different parts of the doc. So 
>>> I need to resize and reposition where they are actually used.
>>> 
>>> Not sure if this is a clue or…
>>> 
>>> John...
>>> 
>>> 
 Hi All,
 
 I’m in the process of changing some SVG routines to be a bit more 
 efficient (I think).
 
 Miyako showed me how to embed svg images as “defs”:
 
 $defs:=SVG_Define_symbol ($domSvg_ptr->;"defs”) 
 
 so I could reuse the graphics without reloading them several times. This 
 part works perfectly.
 
 Previously I would read the image from disk and resize and place:
 
 $tDom_Image:=SVG_New_image ($$domSvg_ptr->;$image_t;$x;$y;$w;$h)
 
 Worked great! no matter the size of the original svg image on disk which 
 are in the neighborhood of 1000 pixels width/height (although there is 
 variation). And I can’t set the originals to a fixed size because the end 
 user can change the same image, in different places of the svg document, 
 to different sizes. So I need to managing the image sizes dynamically.
 
 Anyway, now that I am accessing these “defs” images using:
 
 $glyph:=SVG_Use ($domSvg_ptr->;$id;$inX;$inY;$size_IntrcG;$size_IntrcG)
 
 
 I have to both resize the image and make sure it stays at the x/y coords I 
 need.
 
 But it’s not!
 
 To reset the size I believe I have to use (0.02 being used for testing):
 
 SVG_SET_TRANSFORM_SCALE ($glyph;0.02;0.02) 
 
 
 To reposition at the x/y I believe I have to use:
 
 SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)
 
 The scaling seems to scale BUT the translate is not placing the images at 
 the x/y location I need. Although, the attributes for the object look 
 correct:
 
 height - 14
 transform - scale(0.02,0.02)
 width - 14
 x - 660
 xlink:href - #S09
 y - 660
 
 I am assuming (until I know better) that these values are correct.
 
 So I must be missing something? How do I control both the height/width (I 
 think I am) and the exact x/y placement when I am creating an image using 
 SVG_Use?
 
 Anyone?
 
 Thanks,
 John…
 
 
>>> 
>> 
> 


Re: Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi,

As an aside I am testing in a small sample and opening inn the viewer.

if I use this line:

SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)

it works great! Starts the draw exactly at the x and y.

But if I add this line:

SVG_SET_TRANSFORM_SCALE ($glyph;$_w/$width;$_w/$height)

Then it goes from it’s correct location and jumps to the 0,0 origin I think..

BTW, I am using 4D v16R4 if that matters.

Maybe there’s a better ay to scale? I need to to scale the images based upon 
their original size (width, height) down to what ever the end users selects. 
Usually (in pixels) 14, 16, 18, 20, 24, 28, etc. These need to transform based 
upon the original width and height (usually close to 1000) to a small 
percentage.

Is there another way? A better way?

Thanks,
John…



> Hi Miyako,
> 
>> translate offsets the x/y by the value specified. 
>> the x/y you pass are not absolute coordinates (unless, of course, the x/y in 
>> element are 0,0) 
> 
> Agree!
> 
> I have tested setting the x/y w/h to 0 thinking that it would apply correctly 
> but the svg looks like this:
> 
>  x="0" xlink:href="#S09" y="0”/>
> 
> and the image seems to be at x=0, y=0 even though the size seems to be 
> correct? Always!
> 
> Thanks,
> John…
> 
> 
>> Hi All,
>> 
>> Note: If I apply the transform immediately after I create the symbol:
>> 
>> $symbol:=DOM Create XML 
>> element($defs;"image";"id";$name;"xlink:href";$image;"x";0;"y";0;"width";$width;"height";$height)
>> 
>> SVG_SET_TRANSFORM_SCALE ($symbol;18/$width;18/$height)
>> 
>> That seems to work and would be fine if all I needed were uniform sizes in 
>> the doc. In this example I am resizing them so they are 18 by 18 pixels. But 
>> as indicated previously the end user can set a size property to enlarge or 
>> shrink these sizes for the same symbol in different parts of the doc. So I 
>> need to resize and reposition where they are actually used.
>> 
>> Not sure if this is a clue or…
>> 
>> John...
>> 
>> 
>>> Hi All,
>>> 
>>> I’m in the process of changing some SVG routines to be a bit more efficient 
>>> (I think).
>>> 
>>> Miyako showed me how to embed svg images as “defs”:
>>> 
>>> $defs:=SVG_Define_symbol ($domSvg_ptr->;"defs”) 
>>> 
>>> so I could reuse the graphics without reloading them several times. This 
>>> part works perfectly.
>>> 
>>> Previously I would read the image from disk and resize and place:
>>> 
>>> $tDom_Image:=SVG_New_image ($$domSvg_ptr->;$image_t;$x;$y;$w;$h)
>>> 
>>> Worked great! no matter the size of the original svg image on disk which 
>>> are in the neighborhood of 1000 pixels width/height (although there is 
>>> variation). And I can’t set the originals to a fixed size because the end 
>>> user can change the same image, in different places of the svg document, to 
>>> different sizes. So I need to managing the image sizes dynamically.
>>> 
>>> Anyway, now that I am accessing these “defs” images using:
>>> 
>>> $glyph:=SVG_Use ($domSvg_ptr->;$id;$inX;$inY;$size_IntrcG;$size_IntrcG) 
>>> 
>>> 
>>> I have to both resize the image and make sure it stays at the x/y coords I 
>>> need.
>>> 
>>> But it’s not!
>>> 
>>> To reset the size I believe I have to use (0.02 being used for testing):
>>> 
>>> SVG_SET_TRANSFORM_SCALE ($glyph;0.02;0.02)  
>>> 
>>> 
>>> To reposition at the x/y I believe I have to use:
>>> 
>>> SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)
>>> 
>>> The scaling seems to scale BUT the translate is not placing the images at 
>>> the x/y location I need. Although, the attributes for the object look 
>>> correct:
>>> 
>>> height - 14
>>> transform - scale(0.02,0.02)
>>> width - 14
>>> x - 660
>>> xlink:href - #S09
>>> y - 660
>>> 
>>> I am assuming (until I know better) that these values are correct.
>>> 
>>> So I must be missing something? How do I control both the height/width (I 
>>> think I am) and the exact x/y placement when I am creating an image using 
>>> SVG_Use?
>>> 
>>> Anyone?
>>> 
>>> Thanks,
>>> John…
>>> 
>>> 
>> 
> 

**
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: Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi Miyako,

> translate offsets the x/y by the value specified. 
> the x/y you pass are not absolute coordinates (unless, of course, the x/y in 
> element are 0,0) 

Agree!

I have tested setting the x/y w/h to 0 thinking that it would apply correctly 
but the svg looks like this:

  
> SVG_SET_TRANSFORM_SCALE ($symbol;18/$width;18/$height)
> 
> That seems to work and would be fine if all I needed were uniform sizes in 
> the doc. In this example I am resizing them so they are 18 by 18 pixels. But 
> as indicated previously the end user can set a size property to enlarge or 
> shrink these sizes for the same symbol in different parts of the doc. So I 
> need to resize and reposition where they are actually used.
> 
> Not sure if this is a clue or…
> 
> John...
> 
> 
>> Hi All,
>> 
>> I’m in the process of changing some SVG routines to be a bit more efficient 
>> (I think).
>> 
>> Miyako showed me how to embed svg images as “defs”:
>> 
>> $defs:=SVG_Define_symbol ($domSvg_ptr->;"defs”) 
>> 
>> so I could reuse the graphics without reloading them several times. This 
>> part works perfectly.
>> 
>> Previously I would read the image from disk and resize and place:
>> 
>> $tDom_Image:=SVG_New_image ($$domSvg_ptr->;$image_t;$x;$y;$w;$h)
>> 
>> Worked great! no matter the size of the original svg image on disk which are 
>> in the neighborhood of 1000 pixels width/height (although there is 
>> variation). And I can’t set the originals to a fixed size because the end 
>> user can change the same image, in different places of the svg document, to 
>> different sizes. So I need to managing the image sizes dynamically.
>> 
>> Anyway, now that I am accessing these “defs” images using:
>> 
>> $glyph:=SVG_Use ($domSvg_ptr->;$id;$inX;$inY;$size_IntrcG;$size_IntrcG)  
>> 
>> 
>> I have to both resize the image and make sure it stays at the x/y coords I 
>> need.
>> 
>> But it’s not!
>> 
>> To reset the size I believe I have to use (0.02 being used for testing):
>> 
>> SVG_SET_TRANSFORM_SCALE ($glyph;0.02;0.02)   
>> 
>> 
>> To reposition at the x/y I believe I have to use:
>> 
>> SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)
>> 
>> The scaling seems to scale BUT the translate is not placing the images at 
>> the x/y location I need. Although, the attributes for the object look 
>> correct:
>> 
>> height - 14
>> transform - scale(0.02,0.02)
>> width - 14
>> x - 660
>> xlink:href - #S09
>> y - 660
>> 
>> I am assuming (until I know better) that these values are correct.
>> 
>> So I must be missing something? How do I control both the height/width (I 
>> think I am) and the exact x/y placement when I am creating an image using 
>> SVG_Use?
>> 
>> Anyone?
>> 
>> Thanks,
>> John…
>> 
>> 
> 

**
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
**

Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi All,

Note: If I apply the transform immediately after I create the symbol:

$symbol:=DOM Create XML 
element($defs;"image";"id";$name;"xlink:href";$image;"x";0;"y";0;"width";$width;"height";$height)
   
SVG_SET_TRANSFORM_SCALE ($symbol;18/$width;18/$height)

That seems to work and would be fine if all I needed were uniform sizes in the 
doc. In this example I am resizing them so they are 18 by 18 pixels. But as 
indicated previously the end user can set a size property to enlarge or shrink 
these sizes for the same symbol in different parts of the doc. So I need to 
resize and reposition where they are actually used.

Not sure if this is a clue or…

John...


> Hi All,
> 
> I’m in the process of changing some SVG routines to be a bit more efficient 
> (I think).
> 
> Miyako showed me how to embed svg images as “defs”:
> 
> $defs:=SVG_Define_symbol ($domSvg_ptr->;"defs”) 
> 
> so I could reuse the graphics without reloading them several times. This part 
> works perfectly.
> 
> Previously I would read the image from disk and resize and place:
> 
> $tDom_Image:=SVG_New_image ($$domSvg_ptr->;$image_t;$x;$y;$w;$h)
> 
> Worked great! no matter the size of the original svg image on disk which are 
> in the neighborhood of 1000 pixels width/height (although there is 
> variation). And I can’t set the originals to a fixed size because the end 
> user can change the same image, in different places of the svg document, to 
> different sizes. So I need to managing the image sizes dynamically.
> 
> Anyway, now that I am accessing these “defs” images using:
> 
> $glyph:=SVG_Use ($domSvg_ptr->;$id;$inX;$inY;$size_IntrcG;$size_IntrcG)   
> 
> 
> I have to both resize the image and make sure it stays at the x/y coords I 
> need.
> 
> But it’s not!
> 
> To reset the size I believe I have to use (0.02 being used for testing):
> 
> SVG_SET_TRANSFORM_SCALE ($glyph;0.02;0.02)
> 
> 
> To reposition at the x/y I believe I have to use:
> 
> SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)
> 
> The scaling seems to scale BUT the translate is not placing the images at the 
> x/y location I need. Although, the attributes for the object look correct:
> 
> height - 14
> transform - scale(0.02,0.02)
> width - 14
> x - 660
> xlink:href - #S09
> y - 660
> 
> I am assuming (until I know better) that these values are correct.
> 
> So I must be missing something? How do I control both the height/width (I 
> think I am) and the exact x/y placement when I am creating an image using 
> SVG_Use?
> 
> Anyone?
> 
> Thanks,
> John…
> 
> 

**
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
**

Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi All,

I’m in the process of changing some SVG routines to be a bit more efficient (I 
think).

Miyako showed me how to embed svg images as “defs”:

$defs:=SVG_Define_symbol ($domSvg_ptr->;"defs”) 

so I could reuse the graphics without reloading them several times. This part 
works perfectly.

Previously I would read the image from disk and resize and place:

$tDom_Image:=SVG_New_image ($$domSvg_ptr->;$image_t;$x;$y;$w;$h)

Worked great! no matter the size of the original svg image on disk which are in 
the neighborhood of 1000 pixels width/height (although there is variation). And 
I can’t set the originals to a fixed size because the end user can change the 
same image, in different places of the svg document, to different sizes. So I 
need to managing the image sizes dynamically.

Anyway, now that I am accessing these “defs” images using:

$glyph:=SVG_Use ($domSvg_ptr->;$id;$inX;$inY;$size_IntrcG;$size_IntrcG) 


I have to both resize the image and make sure it stays at the x/y coords I need.

But it’s not!

To reset the size I believe I have to use (0.02 being used for testing):

SVG_SET_TRANSFORM_SCALE ($glyph;0.02;0.02)  


To reposition at the x/y I believe I have to use:

SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY)

The scaling seems to scale BUT the translate is not placing the images at the 
x/y location I need. Although, the attributes for the object look correct:

height - 14
transform - scale(0.02,0.02)
width - 14
x - 660
xlink:href - #S09
y - 660

I am assuming (until I know better) that these values are correct.

So I must be missing something? How do I control both the height/width (I think 
I am) and the exact x/y placement when I am creating an image using SVG_Use?

Anyone?

Thanks,
John…


**
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: Tab into subform containers and GOTO OBJECT

2017-11-30 Thread truegold via 4D_Tech
Hi Kirk,

> Does sound pretty complex.

Yep!

> ​Well two thoughts. First, you can use an object array in a listbox without 
> 4D WritePro or anything else - you just can't display them directly.

First I implemented my original design using List box columns working with 
object arrays. My version very much acts like the property editor in design.

http://livedoc.4d.com/4D-Language-Reference-16-R4/List-Box/Using-object-arrays-in-columns-4D-View-Pro.300-3317571.en.html

Actually if you need to use them in a client-server setup you will need 
separate licenses for each user to utilize the behavior. I tried to get 4D to 
make this one feature native to 4D but they said it’s not possible.

Additionally there are limits to what I can do in a cell. So to avoid the first 
issue and expand my UI possibilities I am rewriting months of work. Thus where 
I have arrived! And still trying to understand the ins and outs of multi-level 
deep subforms.

> Second is I worked out a routine to put c-objects into an hList and allow 
> the user to edit the values if you prefer to look at it like a c-obj. I'll 
> be sharing that at my presentation in DC. ​ 

I would’ve also created a session for DC but my son’s wedding redirected my 
time and resources. I was going to show/explain my property editor and then the 
panel approach as well. But alas…

I love objects! They allow me to create organized messes - much like my desk - 
where I can get a moot done! 

JOhn…

**
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: Tab into subform containers and GOTO OBJECT

2017-11-30 Thread truegold via 4D_Tech
Hi Kirk,

Sure

I have a parent form that is made up (currently) of a toolbar, an area for svg 
drawing, a tab control and a subform container which holds other subform 
containers.

Within the subform container it contains a palette subform container and within 
this contains depending upon the page, various subforms and on those subforms 
they might also contain another subform of a widget.

In this App I am creating templates that will be reused for my needs. Each 
template has hundreds of customized properties that effect the drawing of the 
svg image.

It’s quite complicated!

I had it all worked out (prior to last 4D world) using Object arrays. Then I 
found out that I will need to have a licenses for 4D Spreadsheet (or whatever 
they call it) to use them. Think 4D property editor and that’s what I created.

So now I am redoing it using panes=subform but there will be at least three 
separate palettes which house the panes. And I like this approach because then 
I can include richer UI objects like sliders and the like.

I am trying to create something like an Inspector functionally similar to what 
you will see in OmniGraffle or Curio or many other apps.

Does that make sense?

John...

> Hi John,
> I'm curious what the situation is for having multiple embedded subforms
> beyond things like widgets for dates and such. Care to talk a little about
> what you need to do or why stacked subforms was your choice for it?
> 
> On Wed, Nov 29, 2017 at 5:11 PM, truegold via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Parent form: subform container1 -> subform container2 -> Subform (here’s
>> where I want to set GOTO OBJECT)
**
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: Tab into subform containers and GOTO OBJECT

2017-11-30 Thread truegold via 4D_Tech
Hi Miyako,

Taking a clue from your thoughts I added an On Deactivate in the form method of 
the Subform and it seems to work.

But now I lose the tabbing out of the subform to other objects on the form. 
This fix has the effect of remaining inside the subform as thought it were the 
only object that existed on the form.

In this case maybe that will still work. But there must be an event that would 
allow me to escape from the subform?

Thanks,
John...


> I might have misunderstood your question, if that is the case, please ignore.
> 
> On Getting Focus on the Container corresponds to On Activate in the Subform.
> On Losing Focus on the Container corresponds to On Deactivate in the Subform.
> 
> this is documented (Form event).
> 
> I can get an On Getting Focus event on subform container2 but not into the
> Subform.

**
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: Tab into subform containers and GOTO OBJECT

2017-11-30 Thread truegold via 4D_Tech
Hi All,

So…

In subform container2 I have added the command:

EXECUTE METHOD IN SUBFORM($sbfm_Name;"PNL_General_GOTO";*)

And in the method I have a single call:

GOTO OBJECT(varName) 

The execute method seems to be working (I can tell in trace mode) as it is 
called when subform container2 is in focus. But the object is not selected!

In fact I can modify the value of the variable and see the change each time the 
subform container2 is in focus.

varName:= varName +"."
GOTO OBJECT(varName)

Vincent de Lachaux explained something similar  for someone who was replacing a 
Post Click command…

The subform container must be set "Focusable". 
Then, when the container get the focus the form event "On Activate" is 
triggered. 
So when the subform get this event, just do a GOTO object. 

I tried this and I can update the variables contents but GOTO object does not 
simulate a click into the variable.

Any other ideas?

John...

> Hi Peter,
> 
> Yea, I can’t figure it out the correct command. It’s easy to get the focus on 
> the container but then I have not been able to figure out what command to use 
> to communicate with the subform .
> 
> In fact I changed the form so the only object that was table and focusable 
> was the subform container1. But tabbing just selects the container.
> 
> Anyway, I will persevere as there has got to be a way.
> 
> Thanks,
> John...
> 
>> Probably not. I was able to do this by calling subform in On losing focus 
>> and then let subform execute GOTO OBJECT. As I need to jump from subform to 
>> subform, messaging need to go through parent area. I do not know if it 
>> would work with subforms in subforms. 
>> 
> 
>> On Getting Focus on the Container corresponds to On Activate in the Subform. 
>> On Losing Focus on the Container corresponds to On Deactivate in the 
>> Subform. 
>> 
>> this is documented (Form event). 
>> 
>> I can get an On Getting Focus event on subform container2 but not into the 
>> Subform. 
> 
>> Hi All,
>>> 
>>> This is kind of like the thread that ran "subforms and object focus” when 
>>> opening the parent form.
>>> 
>>> In my case I have a parent form open already and I am tabbing from object 
>>> to object. What I want to happen is when I tab to subform container1 I want 
>>> the first object (or some object of choice) within it to be selected and 
>>> ready for edit.
>>> 
>>> That parent level subform container1 is the holder of another subform 
>>> container2 (because I need to swap subforms within here) which then 
>>> contains the subform where I want to set the goto object.
>>> 
>>> Parent form: subform container1 -> subform container2 -> Subform (here’s 
>>> where I want to set GOTO OBJECT)
>>> 
>>> I can get an On Getting Focus event on subform container2 but not into the 
>>> Subform. So then I need to trick the subform to respond to an event. But 
>>> this doesn’t work:
>>> 
>>> EXECUTE METHOD IN SUBFORM($sbfm_Name;"PNL_General";*)
>>> 
>>> The only way I can get it to select a field or variable is to click within 
>>> the subform container object.
>>> 
>>> So… I must be missing something?
>>> 
>>> Thanks,
>>> John…
>>> 
>> 
>> 

**
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: Tab into subform containers and GOTO OBJECT

2017-11-30 Thread truegold via 4D_Tech
Hi Peter,

Yea, I can’t figure it out the correct command. It’s easy to get the focus on 
the container but then I have not been able to figure out what command to use 
to communicate with the subform .

In fact I changed the form so the only object that was table and focusable was 
the subform container1. But tabbing just selects the container.

Anyway, I will persevere as there has got to be a way.

Thanks,
John...

> Probably not. I was able to do this by calling subform in On losing focus 
> and then let subform execute GOTO OBJECT. As I need to jump from subform to 
> subform, messaging need to go through parent area. I do not know if it 
> would work with subforms in subforms. 
> 

> On Getting Focus on the Container corresponds to On Activate in the Subform. 
> On Losing Focus on the Container corresponds to On Deactivate in the Subform. 
> 
> this is documented (Form event). 
> 
> I can get an On Getting Focus event on subform container2 but not into the 
> Subform. 

> Hi All,
>> 
>> This is kind of like the thread that ran "subforms and object focus” when 
>> opening the parent form.
>> 
>> In my case I have a parent form open already and I am tabbing from object to 
>> object. What I want to happen is when I tab to subform container1 I want the 
>> first object (or some object of choice) within it to be selected and ready 
>> for edit.
>> 
>> That parent level subform container1 is the holder of another subform 
>> container2 (because I need to swap subforms within here) which then contains 
>> the subform where I want to set the goto object.
>> 
>> Parent form: subform container1 -> subform container2 -> Subform (here’s 
>> where I want to set GOTO OBJECT)
>> 
>> I can get an On Getting Focus event on subform container2 but not into the 
>> Subform. So then I need to trick the subform to respond to an event. But 
>> this doesn’t work:
>> 
>> EXECUTE METHOD IN SUBFORM($sbfm_Name;"PNL_General";*)
>> 
>> The only way I can get it to select a field or variable is to click within 
>> the subform container object.
>> 
>> So… I must be missing something?
>> 
>> Thanks,
>> John…
>> 
> 
> 
**
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
**

Tab into subform containers and GOTO OBJECT

2017-11-29 Thread truegold via 4D_Tech
Hi All,

This is kind of like the thread that ran "subforms and object focus” when 
opening the parent form.

In my case I have a parent form open already and I am tabbing from object to 
object. What I want to happen is when I tab to subform container1 I want the 
first object (or some object of choice) within it to be selected and ready for 
edit.

That parent level subform container1 is the holder of another subform 
container2 (because I need to swap subforms within here) which then contains 
the subform where I want to set the goto object.

Parent form: subform container1 -> subform container2 -> Subform (here’s where 
I want to set GOTO OBJECT)

I can get an On Getting Focus event on subform container2 but not into the 
Subform. So then I need to trick the subform to respond to an event. But this 
doesn’t work:

EXECUTE METHOD IN SUBFORM($sbfm_Name;"PNL_General";*)

The only way I can get it to select a field or variable is to click within the 
subform container object.

So… I must be missing something?

Thanks,
John…


**
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: Image Grid Widget

2017-10-29 Thread truegold via 4D_Tech
Hi Ingo,

Thanks that helped.

Part of the images displayed and part didn’t. But there seems to b an xml error 
that I have to address.

Anyway, that got be part day there.

Appreciate,
John...

> try "image/svg+xml" as media type, e.g.
> $dataURI:="data:image/svg+xml;base64,"+...

**
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
**

Image Grid Widget

2017-10-27 Thread truegold via 4D_Tech
Hi Miyako (or anyone please),

I am looking at the cool Image Grid Widget you created years back. It was setup 
to handle and display png images.

I have upgraded it to 4D v15 and I am trying to use it to display a list of svg 
images.

The code to read a PNG and display in a web page is:

PICTURE TO BLOB($picture;$data;".png")
BASE64 ENCODE($data)

$dataURI:="data:image/png;base64,"+Convert to text($data;"utf-8")
$dataURI:=Replace string(Replace string($dataURI;"\r";"";*);"\n";"";*)

I’ve replaced “png" references with “svg".

PICTURE TO BLOB($picture;$data;".svg")  // png
BASE64 ENCODE($data)

$dataURI:="data:image/svg;base64,"+Convert to text($data;"utf-8")  //  
data:image/png;base64
$dataURI:=Replace string(Replace string($dataURI;"\r";"";*);"\n";"";*)

I have partial success in that some svg images display in the grid and others 
don’t. BUT all of them show up as small "question mark picture frames” as each 
image in the web page.

I am missing something and not quite sure what?

Thanks for your help,
John…

**
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: 4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-09-01 Thread truegold via 4D_Tech
Hi David,

Thanks for the additional thoughts.

> If I catch what you're thinking about correctly, you sound inclined to make
> the message broker smarter. That's a solid plan, if the extra complexity
> can pay for itself. 

NO! I plan to keep it as smart as you have made it and see how that works. I 
not interested in optimizing for speed unless it’s demonstrably slower - which 
it doesn’t appear to be.

Simple is better now!

Appreciate, as always,
John…

**
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: 4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-31 Thread truegold via 4D_Tech
Hey Brent,

You’re welcome!

I would be very interested in "the worker watcher code soon with a little demo 
video”! especially with a little video explanation.

Please let me know when it’s available.

Appreciate,
John…



> Thanks John!  It is good to hear that people are getting some valuable input
> and discussion from these meetings :)
> 
> I have posted Davids slides on 4DMethod.  Thanks for making them available,
> David!
> https://4dmethod.files.wordpress.com/2017/08/slides.pdf
> 
> Ill also share the worker watcher code soon with a little demo video if
> people are interested.  I find that it helps give some insight as to how
> busy my workers are.
> 
> Best,
> 
> Brent
> 
**
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: 4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-31 Thread truegold via 4D_Tech
Hey David,

Ref: "I'm sceptical that slides are worth much without a presentation but, 
well, here you go! “

True except for some of the slides were used in your presentation and they 
layout on clear diagram form some of thew points you made. Especially the one 
where you renamed the command to make it clear how they were really functioning!

So some of them will be quite useful for building our mental frameworks of 
understanding.

So thank you again!

Ref: "Oh, and the most important point about Publish/Subscribe can't be said 
too often:The think knows about itself.”

Yes!!! I built StructurePulse with that concept in mind and a Publish/Subscribe 
technique. It was written using objectTools. IN fact everything was an object 
and I only used the database for persistence.

I just started reviewing my code (although in 4D 2004) and saw your 
presentation. So I will start with this polished approach and if I need to 
change pr extend I will do so. I recall that my original one had the objects 
subscribe to specific services and then the routing object would only send 
messages to objects looking for them.

But inn this caae it sends the message to any object that subscribes and if the 
object is interested it dos whatever it needs to do. If not it ignores it. So I 
think I’ll start with your approach this time and see how that works first. I 
think it will be more than enough.

Anyway, thank you again David!

Much Appreciated,
John…

**
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
**

4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-30 Thread truegold via 4D_Tech
Hi All,

If you were not able to see it the 4dMethod.com presentation today - you really 
go to!!!

David Adams did a wonderful job explaining how he implemented 
Publish/Subscribe. Just what the doctor ode red in my case as I was about to 
implement something similar in a database I am working on. Although now I will 
approach it differently then I did way back in StructurePulse days.

Anyway, David explains Call Form/Call Worker in a way that it finally clicked 
for me. And did I say he posted the source code with an easy to understand demo.

I could parrot what he said but then I’d spoil the fun you’ll have of watching 
the video posted.

So David well done!!!

And Brent thanks again for spearheading these meetings. I’m sure all who have 
attended (past and present) feel the same way. We salute you!!!

https://4dmethod.com/2017/08/17/august-30th-meeting-publishsubscribe-component-for-4d-david-adams/#more-740

Hey David I would love to get a copy of those various diagram slides you 
showed. It really made things so clear.

Full of appreciation,
John…


**
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: Dynamic Tabs using hierarchical list

2017-07-01 Thread truegold via 4D_Tech
Hi All,

I finally found an example from back in 2001!

Too simple:

Create the tab control on your form I made the var type string.

In On Load form event:

C_LONGINT(Tab_Control)

//  Build hierarchical list
Tab_Control:=New list
APPEND TO LIST(Tab_Control;"c1";1)
APPEND TO LIST(Tab_Control;"c1";1)
… as many as you need.

In my case I need to add/delete based upon the number of objects the user 
requires.

So…

In On Clicked form event (or other event):

$itemCnt:=Count list items(Tab_Control)

I want to add them at the end of the list:

APPEND TO LIST(Tab_Circles;"c"+String($itemCnt+1);$itemCnt+1)

Note: You can always add them before/after an item based upon:

$pos:=Selected list items(Tab_Control)
INSERT IN LIST(Tab_Control;...

Anyway if need to delete…

DELETE FROM LIST(Tab_Control;*)

4D handles the redraw automatically.

Now I might get fancier but this is what I needed for part of a subform UI.

Maybe someone else will need it in the future.

John...

> Hi all,
> 
> I have a need for a dynamically created tab. I need it to be generated from 
> within a subform that will add a tab for each object created.
> 
> In this case it’s simple (I don’t think I need images). Think of an address 
> book with A,B,C,D...
> 
> I can do that BUT what I can’t recall how to do was use a hierarchical list 
> as a tab interface.
> 
> And I cannot find any 4D examples or HDi or Tech Tips or Tech Notes or in the 
> NUG showing the how to.
> 
> I recall it was easy?
> 
> I could create it SVG but I think the HList approach would work.
> 
> Can someone either point me to a 4D example database OR send me the steps I 
> would need to do it?
> 
> Appreciate,
> John...

**
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
**

Dynamic Tabs using hierarchical list

2017-07-01 Thread truegold via 4D_Tech
Hi all,

I have a need for a dynamically created tab. I need it to be generated from 
within a subform that will add a tab for each object created.

In this case it’s simple (I don’t think I need images). Think of an address 
book with A,B,C,D...

I can do that BUT what I can’t recall how to do was use a hierarchical list as 
a tab interface.

And I cannot find any 4D examples or HDi or Tech Tips or Tech Notes or in the 
NUG showing the how to.

I recall it was easy?

I could create it SVG but I think the HList approach would work.

Can someone either point me to a 4D example database OR send me the steps I 
would need to do it?

Appreciate,
John...
**
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: Favorite tricks and keystrokes: Please take one and leave one

2017-05-30 Thread truegold via 4D_Tech
Hey Tom,

Cool idea!

I keep windows open (way too many…) all the time so I can remember things I 
am/was working on - for various reasons.

So now I’ll create a method where I store recent windows. Then I can close them 
without worry of forgetting of spending time drilling down into where they 
were. In fact adds an ability to even add some comments.

Anyway thanks for sharing.

John... 

> I use a method called WindowList which puts a list of all the Design 
> Environment windows open onto the clipboard. I paste this into a method 
> called _Work to keep "project" parts readily available. So, when I need to 
> work on something else for a while, all the other project windows can be 
> closed and opened back up later.
> 
> Basically:
> 
> WINDOW LIST($aWinRef)
> ARRAY TEXT($aWinName;Size of array($aWinRef))
> For ($Ndx;1;Size of array($aWinRef))
>  $aWinName{$Ndx}:=Get window title($aWinRef{$Ndx})
> End for
> 
> plus a big Case statement for windows I don't want to keep, like the 
> Explorer, etc. And, of course I put a comment character at the beginning of 
> each line.

**
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
**

Fwd: Disable close button on Splash screen windows v12

2017-05-30 Thread truegold via 4D_Tech
Hi All,

Wanted to confirm that by simply setting a password to Designer and creating 
another default user group that did not have access to Design wound up fixing 
rings quite elegantly.

That’s the first part in my scenario.

The second part was to continue using our custom login and then after the login 
screen have some code that sets a user to one of these groups depending upon 
permissions set in a user record.

Easy and reliable!

Now if the close box is clicked on the splash screen an alert opens and let’s 
you know you don;t have access and asks if you want to quite. Nicely provides a 
choice if you clicked by accident.

Anyway, thank you to all who shared ideas.

And Tim I’m glad you were following this thread as I could have wasted a lot 
more time trying to come up with a solution.

Appreciate all,
John...

> 
> 
>> Hi John,
>> 
>> I just ran some quick tests and I think the most likely scenario here is 
>> that you still need to assign a password to Designer (which is required to 
>> enable the 4D password system).
>> 
>> Enabling the 4D Password System is a requirement for many features in 4D 
>> that pertain to the users and groups, this includes managing plugin access, 
>> preventing users from cancelling the backup while it is running, and also 
>> the "Default User".
>> 
>> The "Default User" setting will be ignored if the 4D Password System is not 
>> enabled; meaning that anyone who opens the application will be automatically 
>> logged in as Designer.
>> 
>> -Tim
> 

**
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: Disable close button on Splash screen windows v12

2017-05-19 Thread truegold via 4D_Tech
Hi Tim,

Ok, will experiment and see how ti works out.

I will then need to suppress and 4D dialog and handle it programmatically.

Thanks for the help,
John...

> Hi John,
> 
> I just ran some quick tests and I think the most likely scenario here is that 
> you still need to assign a password to Designer (which is required to enable 
> the 4D password system).
> 
> Enabling the 4D Password System is a requirement for many features in 4D that 
> pertain to the users and groups, this includes managing plugin access, 
> preventing users from cancelling the backup while it is running, and also the 
> "Default User".
> 
> The "Default User" setting will be ignored if the 4D Password System is not 
> enabled; meaning that anyone who opens the application will be automatically 
> logged in as Designer.
> 
> -Tim

**
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: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Floyd,

> It is the opposite. The checkbox under Database Settings/Security allows you 
> to set a 4D group that HAS access to design mode.
> We create the group “Development” as the Designer, so the Administrator 
> doesn’t have access to edit.

Ok …

So I already have a group created “Admin" that is set to “Design Access” in 
Database Settings->Security. It looks like it includes Designer and 
Administrator.

I have group named “Default Group”.

I originally set this up because we wanted to limit who used up 4D Write 
licenses. Not currently being used however.

So after they do their custom login can’t I...

just assign the admin user that logs in to the “Admin” group and everyone else 
to the "Default Group”?

Seems like that should work.

Appreciate,
John…

**
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: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Alan,

Thanks, I’ll give it a try.

I did realize that part of my problem - and why I need a 4D group to prevent 
access - is that some of the code is still run inside the 4D application 
process which is what also controls the splash screen. So it’s possible, even 
after hiding it, to still get into “design mode”.

So if I get the group access figured out so that only admin has access to 
“design mode” in a compiled database then they can keep their splash screen 
window.

I appreciate the code though and will test it.

John...

> 
>> From my code in v13
> 
> Called on Startup method
> DisableWinAppCloseBox (0)  //disable mdi window close box
> DisableWinAppCloseBox (1)  //disable flash screen close box
> 
> The following is trim down version for clarity
> 
> If (<>Platform=3)  //if it is window
> If ($1=0)
> $winRef:=gui_GetWindow ("")  //this is for MDI window
> Else 
> $flashRef:=Frontmost window
> $winRef:=gui_GetWindowFrom4DWin ($flashRef)
> End if 
> 
> If ($winRef>0)
> If ($1=1)  //for flash screen
> $prefered:=<>ScreenWidth  //this is MDI width
> SET WINDOW RECT(0;<>MenuHeight*2;$prefered;<>MDIHeight;$flashRef)  //this 
> must be done before disable close box
> $error:=gui_SetWindowLong ($winRef;WS_MINIMIZEBOX | WS_MAXIMIZEBOX | 
> WS_SYSMENU;WIN_DISABLE;WIN_STYLE)
> End if 
> $error:=gui_DisableCloseBox ($winRef)
> Else 
>  //not concerned in this message
> End if 
> Else 
>  //not concerned in this message
> End if 
> 
> Alan Chan

**
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: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Robert,

I think you meant me not Jeremy.

This database - and how this admin user has managed things - goes back to 1993 
or so. The user has been able to get into “user mode”, now called “design 
mode”, reliably up until 4D 2012.

Rather than having code for everything minor change this user still prefers a 
quick and dirty sprint into “design mode”. Dangerous? Yep! explained? Yep! User 
wants to change? Nope!

That’s what I meant. But the only person who is supposed to be able to get into 
“design mode” is admin.

Hopefully that explains my ordeal.

Appreciate,
John...

> Jeremy:
> 
> 'Quick Edits' of what?
> 
> My databases are all compiled. The Designer can do anything, including 
> exiting the splash screen, and then to user mode. Anyone else can have 
> certain privileges  (or most all), but they can not exit the splash 
> screen.
> 
> Easy to do.
> 
>> On May 16, 2017, at 2:32 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Hi Jeremy,
>> 
>> Thanks for the info.
>> 
>> I need to make sure that if they log in as admin then this restriction is 
>> not there. I have tried for years to dissuade the “power” user from going 
>> into “design mode” but she uses it for quick edits (as unreliable as it has 
>> seemingly become). Anyway...
>> 
>> So I need to make sure only users that are part of the “keep out” group are 
>> kept out.
>> 
>> Will this approach work?
>> 
>> Appreciate,
>> John...

**
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: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi Jeremy,

Thanks for the info.

I need to make sure that if they log in as admin then this restriction is not 
there. I have tried for years to dissuade the “power” user from going into 
“design mode” but she uses it for quick edits (as unreliable as it has 
seemingly become). Anyway...

So I need to make sure only users that are part of the “keep out” group are 
kept out.

Will this approach work?

Appreciate,
John...

> Hi John,
> 
> Have you looked at "Setting a Default User" in the Design Reference?
> 
> If you want to allow:
> 1) Users to never see the 4D Password Dialog; and
> 2) Users to only see your password system; and
> 3) 4D password system to keep users out of design environment
> 
> then take a look at "Setting a Default User" at:
> 
> http://doc.4d.com/4Dv16/4D/16.1/Setting-a-Default-User.300-3373311.en.html
> 
> To setup a default user and limit access to the Design Environment, you would:
> 1) create a group for design access (for example, "design_access".)
> 2) Create a default user with **NO** password or group assigned (for example, 
> "default_user".)
> 3) Assign the users "designer" and "administrator" to the "design_access" 
> group.
> 
> In Database Settings -> Security, do the following:
> 1) Specify the group for design access from popup of group names.
> 2) Specify the default user name from popup of user names.
> 3) Uncheck "users can change password".
> 
> When usersr enters the database, they automatically enter as the default 
> user. No 4D Password Dialog appears. 
> 
> You then present your custom password login dialog.
> 
> Beware in this scheme you will not be able to get into the Design Environment 
> again, unless the 4D Password System dialog appears to allow you to enter as 
> designer.
> 
> When opening a database, you can force the 4D Password Dialog to appear by 
> holding down the shift key.
> 
> Best regards,
> Jeremy French
> 
> 
>> On May 16, 2017, at 4:28 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> So if I want to protect the db from a user getting into “design mode” - 
>> given we have rolled our own password security - can I simply do the 
>> following:
>> 
>> Add a 4D Group in the password editor. Is there not a checkbox to disallow a 
>> user into design? So if I set things up this way and then…
>> 
>> After the user logins to our custom PW login system immediately identify 
>> them as a member of this group will that work? Will that keep them from 
>> getting access?
> 

**
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: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi All,

I’m asking this because I have time scheduled tomorrow to try this approach. 
But I though I’d explained and see what others have experienced using similar 
approaches.

So if I want to protect the db from a user getting into “design mode” - given 
we have rolled our own password security - can I simply do the following:

Add a 4D Group in the password editor. Is there not a checkbox to disallow a 
user into design? So if I set things up this way and then…

After the user logins to our custom PW login system immediately identify them 
as a member of this group will that work? Will that keep them from getting 
access?

Thanks,
John...

> 4D v12 Windows clients
> 
> I have read all the threads in the Nug concerning this and can’t seem to find 
> a solution.
> 
> I have been trying to figure out how to disable the close button on Splash 
> screen windows v12. Not the main Application window (that works).
> 
> If I use the command “gui_DisableCloseBox(windowHandle)” from Win32API it 
> does disable the close button of the application window but not the splash 
> screen.
> 
> I need the Splash screen to also have a disable close button.
> 
> Why would I want to do that? because the client WANTS the splash screen and 
> keeps it maximized.
> 
> Is there any straight-forward way using Win32API?
> 
> Thanks,
> John…
> 
**
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: Disable close button on Splash screen windows v12

2017-05-13 Thread truegold via 4D_Tech
Hi Doug,

Thank you! I’ll give it a test.

I’ve had mixed result so far with only being able to disable the close box of 
the parent window (main app window).

Appreciate,
John...

> Just snarfed this from a legacy application and watched the code execute.
> 
> $Error_Code:=gui_SetWndRect
> ($Window_Handle;0;0;<>WND_vWindow_Width;<>WND_vWindow_Height)
> $Error_Code:=gui_SetWindowLong ($Window_Handle;WS_THICKFRAME |
> WS_MAXIMIZEBOX;WIN_DISABLE;WIN_STYLE)
> $Error_Code:=gui_DisableCloseBox ($Window_Handle)
> 
> Line 1 sets the window size
> Line 2 disables the minimize
> Line 3 disables the close box
> 
> 
> 
> --
> Douglas von Roeder
> 949-336-2902

**
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: 4D Write Pro Interface component

2017-05-09 Thread truegold via 4D_Tech
Hey John,

> When I open my database with the component in the component folder, I cannot 
> see any of the component methods or forms


I don’t think you will as they are like a widget. I haven;t explored enough yet 
(I plan to next week) to see how it sets things. But since it’s set up as a 
widget then the general widget docs hopefully will help?

> As you suggested Icreated a subform, but WP_Pallette is not listed under 
> Detail Forms. I tried using the component as received as well as built.

If so then yea, it’s not being seen, or it would show up as a form that can be 
included as a subform.

>   In the LRP under “Defining a 4D Write Pro area” it mentions talks about 
> the widget. There is a picture of the widget in use and above the document is 
> a ruler. Anyone know how to get that ruler to show?

Look in the 4DBlog and search for ruler. There is a blog about that.

HTH,
John…


> 
>   At this point I am not sure what the component brings to the table. 
> Opening the component I see that it is using the 4D Write Pro Widget that is 
> available i the library without the component.
> 
>   When I open my database with the component in the component folder, I 
> cannot see any of the component methods or forms. As you suggested Icreated a 
> subform, but WP_Pallette is not listed under Detail Forms. I tried using the 
> component as received as well as built.
> 
>   None of the links suggested thus far discuss the component. They all 
> talk about creating your own user interface or the widget, but not about the 
> component. I must not have the component installed properly. 
> 
>   The widget appears to do nearly everything I would have expected from 
> the component. Can’t see what more the component could do or does.
> 
>   In the LRP under “Defining a 4D Write Pro area” it mentions talks about 
> the widget. There is a picture of the widget in use and above the document is 
> a ruler. Anyone know how to get that ruler to show?
> 
> John

**
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
**

Disable close button on Splash screen windows v12

2017-05-09 Thread truegold via 4D_Tech
Hi All,

4D v12 Windows clients

I have read all the threads in the Nug concerning this and can’t seem to find a 
solution.

I have been trying to figure out how to disable the close button on Splash 
screen windows v12. Not the main Application window (that works).

If I use the command “gui_DisableCloseBox(windowHandle)” from Win32API it does 
disable the close button of the application window but not the splash screen.

I need the Splash screen to also have a disable close button.

Why would I want to do that? because the client WANTS the splash screen and 
keeps it maximized.

Is there any straight-forward way using Win32API?

Thanks,
John…

**
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: 4D Write Pro Interface component

2017-05-08 Thread truegold via 4D_Tech
Sigh,

> My assumption (unproven as I am looking for the same insight)…

Sorry I’m not sure if this example uses the component or not.

But I did find...

http://blog.4d.com/4d-write-pro-user-interface/

Yes, just create a subform container and then in the Subform properties select 
“WP_Palette” as the detail form.

Then the rest I leave to your discovery.

John…


> Hi,
> 
> I’d take a look at this 4DBlog “ Create your own interface for 4D Write Pro”. 
> There is an example database you can download. My assumption (unproven as I 
> am looking for the same insight) and found this v16 HDI example.
> 
> http://blog.4d.com/create-your-own-interface-for-4d-write-pro/
> 
> And I’m sure then it might make sense of how to use the component.
> 
> Hope that helps,
> John…
> 
>> Can someone point me to instructions on how to use the 4D Write Pro 
>> Interface component.
> 

**
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: 4D Write Pro Interface component

2017-05-08 Thread truegold via 4D_Tech
Hi,

I’d take a look at this 4DBlog “ Create your own interface for 4D Write Pro”. 
There is an example database you can download. My assumption (unproven as I am 
looking for the same insight)  and found this v16 HDI example.

http://blog.4d.com/create-your-own-interface-for-4d-write-pro/

And I’m sure then it might make sense of how to use the component.

Hope that helps,
John…

> Can someone point me to instructions on how to use the 4D Write Pro Interface 
> component.

**
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
**

Dates and Conditional popup bugs in Query editor

2017-05-05 Thread truegold via 4D_Tech
Hi all,

4D v15.2 & 4D 15.4 (Mac)

It looks like 4D’s Query EDITOR (the one most of my users hate) has some 
issues. I’d like to confirm if others are seeing them.

Here’s what broke for us:

1. The app has a convention of default dates being set as “03/03/0300”. It goes 
back to late 80”s and needing a non-null value that was obvious to them. 
Anyway… This appears to be changed to “03/03/300” which I guess still works 
fine for them.

This has always worked for them up through 4D v12… I upgrade them to 4D v15 and 
this has been an issue. I believe it will allow us to us to type the date value 
in and even query on it. But when we save a query and then reload it the date 
is changed to “00/00/00”. So somewhere in the saving or in the loading 4D 
transform it into a bad date format.

Of course we could try and remember whenever we use a query to change this 
default value but that’s what saving a report is for. Create it, get it 
working, save it and then forget about how it works and just use it.

2. It looks like 4D will correctly save a query with the popup set to “AND or 
“OR” values. But if you then reload and change them and re-save them it looks 
like 4D either ignores them or doesn’t update them. Is anyone else seeing this 
issue?

If the new query editor worked perfectly it would still be disliked by most 
users. But with these bugs it’s almost intolerable.

But before I go through reporting them as bugs I want to make sure I’m not 
issuing anything.

BTW, it looks like Miyako’s version works correctly. Might just go with his 
Query component.

Thanks for your help,
John...
**
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
**

Fwd: 4D World Tour - Denver

2017-05-03 Thread truegold via 4D_Tech
Oh, and Add did a great job expelling and demonstrating how to use subforms. 
You really need to wrap your head around them as they provide such flexibility. 
As I move forward I will try and use subforms every change I get.

JOhn...

> Hi All,
> 
> I just returned form the 4D World Tour in Denver. I am very happy I went.
> 
> I learned quite a bit about where 4D is “theoretically” going and where 4D is 
> “currently" at.
> 
> All the 4D presenters were excellent - even the new guy! And you know who you 
> are.
> 
> Add did a great job of taking sophisticated concepts like “messaging”, list 
> boxes, audio, video, etc., and making it even comprehensible to me.
> 
> JPR was well “JPR”. It’s like having access to a perspective into the minds 
> of the inner 4D coding circle PLUS JPR’s quick witted budgets of wisdom.
> 
> Colorful and funny as always and chock full of wisdom about “workers” and and 
> when to use “preemptive”. I won;t say I completely understand all of this 
> just yet but the example should help me to get my mind around them.
> 
> If you go for no other reason then understanding workers and preemptive - 
> then go!
> 
> You will see why “workers” are the way forward and why “pre-emptive” might 
> not be important is very specific cases. Same thing goes for managing the 
> “cache” versus allowing 4D to handle it.
> 
> I’m teasing because if you’ve thought about going then I’d highly recommend 
> it. You get a bunch of really comprehensive examples, great lunches, great 
> company (4D tech guys included ), chat with “old” 4D friends, some new 
> blood, get to hobnob with Jim Sobczak (well worth the price of admission), a 
> group picture and you’ll come away completely information “drunk”. You’ll 
> need a day or so to decompress.
> 
> And of course they’ll tell you about when the next 4D Summit will be.
> 
> It was a great value for the money! And I would do it all over again.
> 
> John...

**
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 World Tour - Denver

2017-05-03 Thread truegold via 4D_Tech
Hi All,

I just returned form the 4D World Tour in Denver. I am very happy I went.

I learned quite a bit about where 4D is “theoretically” going and where 4D is 
“currently" at.

All the 4D presenters were excellent - even the new guy! And you know who you 
are.

Add did a great job of taking sophisticated concepts like “messaging”, list 
boxes, audio, video, etc., and making it even comprehensible to me.

JPR was well “JPR”. It’s like having access to a perspective into the minds of 
the inner 4D coding circle PLUS JPR’s quick witted budgets of wisdom.

Colorful and funny as always and chock full of wisdom about “workers” and and 
when to use “preemptive”. I won;t say I completely understand all of this just 
yet but the example should help me to get my mind around them.

If you go for no other reason then understanding workers and preemptive - then 
go!

You will see why “workers” are the way forward and why “pre-emptive” might not 
be important is very specific cases. Same thing goes for managing the “cache” 
versus allowing 4D to handle it.

I’m teasing because if you’ve thought about going then I’d highly recommend it. 
You get a bunch of really comprehensive examples, great lunches, great company 
(4D tech guys included ), chat with “old” 4D friends, some new blood, 
get to hobnob with Jim Sobczak (well worth the price of admission), a group 
picture and you’ll come away completely information “drunk”. You’ll need a day 
or so to decompress.

And of course they’ll tell you about when the next 4D Summit will be.

It was a great value for the money! And I would do it all over again.

John...
**
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: Dynamic Method Creation & Content Changing

2017-04-25 Thread truegold via 4D_Tech
Hi All,

So after a little reading of the docs and starting at the very first example 
(which initially seemed incomplete) and baby stepping with simple tests...

I was able to auto create and update methods on the fly using "Method Get 
Code/Method Set Code”

So I have been able to move from a completely manual with and end user 
tinkering in and updating methods to completely automated and taking about a 
second.

Very cool!

Appreciate,
John...

> I couldn’t figure out how to get the Method Set Code command working so I 
> used Rob’s API Create Method to create the new 4D methods. Works great!!!
> 
> I could not get API Set Method to work. In fact it always crashes in 4D v15r2 
> (Mac). So, at this time, I’ll have to 

**
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: Object visualize / browse

2017-04-24 Thread truegold via 4D_Tech
Hey Rolf,

4d web area and javascript! 

That’s simple and and elegant! 

Very cool!

Appreciate,
John…


> This is one possible solution we us a lot in our own applications:
> https://github.com/4dgeek/4d-component-jsonEditor
> 
> Kind Regards
> Rolf

**
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: Dynamic Method Creation & Content Changing

2017-04-23 Thread truegold via 4D_Tech
Hi Nigel,

OK, thanks. I’ll see if I can figure it out.

Appreciate,
John...

> You should not really have much trouble with 4D SET METHOD..I Use it all the 
> time(in development not in a live enviroment) 
> 
> METHOD SET CODE($_t_methodName;$_t_MethodText) 
> 
> just need to make sure method is not open in the design enviroment or you 
> will get an error 


>> I couldn’t figure out how to get the Method Set Code command working so I 
>> used Rob’s API Create Method to create the new 4D methods. Works great!!!
>> 
>> I could not get API Set Method to work. In fact it always crashes in 4D 
>> v15r2 (Mac). So, at this time, I’ll have to 

**
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: Dynamic Method Creation & Content Changing

2017-04-21 Thread truegold via 4D_Tech
Hi Nigel,

First I know the issue of using 4D List as a short cut for using a real lookup 
of records in a table, aka choice list, for example. I have a client who has an 
app (I have inherited this one as well) where there are hundreds of these and 
they are having the kinds of problems you mentioned.  I am slowly replacing 
them with table based choice list lookups.

But after reading your thoughts I realize that in this case I am not really 
doing anything dynamically EXCEPT when things need to be setup for a new study. 
And in this case without rewriting the application it must be handled the way I 
have described. So keep in mind that I have not been tasked to rewrite the App 
but only help them make this aspect of it easier.

SO the dynamic is really a one time thing. What I am really trying do is 
automate it and reduce the chances for error and not have to go through obscure 
notes to figure it out.

There are several NEW 4D lists that must be created each time they create a new 
study. Then these list need to referenced and part of the mechanism is by 
adding the names of these list to another meta list. That’s where the insert 
list items comes in.

Then there are two new methods created each time that use these NEW list. An 
the list names and number are the only thing that changes inside of this 
wrapper method that calls another method with these list names as parameters.

Outside of header and some variable declarations there is a single line of code 
which is the method and parameter list. Not much to validate here.

As to writing code inside another method that’s trickier. I might just open the 
methods and present the code lines for them to copy them in.

It’s not as bad as you think (or else I am a bit delusional! Sometimes it’s 
hard to tell. ) and on the surface it seems quite easy.

I’ll be explaining it to the client today and see what they think. If they say 
go for it then I’ll give it a try and see if I can get most of it automated.

I hope that explains it better. Always hard to explain when you’re trying not 
to be verbose.

Appreciate,
John...

> 4D lists can suck if they are being edited..I remember having trouble with a 
> system a while back where users complained that some drop downs did not have 
> something in that should have been there..testing showed that we had code 
> nicely adding to the 4D list that was being used in the drop down..lots of 
> head scratching..probably a blame fest..then we worked out what was going 
> to..the list we being written to by other clients overwriting the list. and 
> the user had a list different to what they expected.
> 
> In General I avoid using a 4D list for anything dynamic…a table with  
> something like…
> OWNER(User)<-create one ‘system’ owned list for each list name and where no 
> user specific version use the system version…(Duplicate records or combine 
> system owned with private owned)
> LIST_NAME
> LIST_ITEM_NAME
> NAME_ABBREV
> STUDY_REF 
> ..(and a record ID)
> Would be probably be a better way to handle a dynamic list and easier to then 
> relate something like study steps ..step items…step item options..etc
> 
> In my humble you should never need to have code edit itself for this kind of 
> purpose. The code should support and be supported by the data and switches in 
> the data should define the route through the code…that will always be more 
> robust and easier to write than code that writes code. 
> 
> Code that writes code is hard to validate:)..i know this ..lets say in your 
> code you have a line $_t_InsertStatement:=“IF(<>MyBadlyNamedVariable)” 1stly 
> you have to be sure that variable exists. and then if someone decides 
> somewhere to change the name of the variable it wont automatically change in 
> your hardcoded insert line and somewhere you will be getting calls about an 
> error..even worse is when 4D changes the name of the a function call or the 
> parameters.
> 
> Just my tuppence worth.

**
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: Dynamic Method Creation & Content Changing

2017-04-20 Thread truegold via 4D_Tech
Hi David,

First this is an App I took over and am maintaining. The client brought this to 
my attention because after working in the app since the late 80’s it’s still 
not clear and easy to remember all the steps (even with documentation) it takes 
to get things to the point of usability.

As I look at it I see several 4D list that need to be created. I see list items 
that need to be inserted into existing 4D list. I see several methods that have 
to be created (using generic routines where all that changes are the parameters 
names), and several methods that have to have code inserted into case 
statements.

So most of seems to me can be automated. Probably need a UI of some sort to add 
the name, abbreviation, and study number. (Then I can generate most things on 
the fly and view ten in the UI before it’s committed.)

All of this is for setting things up so that another routine will be run that 
reprocesses all this information crafting necessary records that are used based 
upon all these new constructs. And then, finally, the study can begin and data 
captured.

BTW, I’m intentionally trying not to explain everything as it’s a long and 
winding road…

Brittle? I suppose. But if automated less chance for error I think. Less need 
to reread and restudy somewhat unintuitive notes (yes I could rewrite them so 
they are clearer).

Anyway, my main concern was with dynamic method creation and inserting lines of 
code into existing methods. If it can be done then it’s something I might 
pursue - if the client thinks it might be worth it.

Otherwise I’ll trudge through the notes and create the structure manually.

Kind of a proof in concept is what I’m after.

Thanks for your thoughts,
John…


> A method is just a block of text. The magic in the method comes from 4D's
> interpreter. I modify methods via code and also do lots of code generation
> for my standard housekeeping sort of code. You can get and set the text
> however you like.
> 
> With that said, I don't see why you would do it in this case. It sounds
> like you've got some user configurable data that you need to do lookups on
> or otherwise manipulate. (Or are they a sort of decision-tree or driving a
> logic cascade?) Right now you're keeping it in a 4D list and are proposing
> to bake it into code. I think that the problem is that you're using lists
> for data that should be in the data file. Before baking the data into code,
> try and answer the question "how would I do this using the data file?" The
> data file is a great place to keep user-specific config data and such. If
> not there, then in a disk file. Putting the data into the data file makes
> is easier to see, reuse, validate, etc.
> 
> Speaking of validation, it sounds like the setup is a bit brittle and easy
> to mess up. Another solid argument for the data file. You need a UI for the
> configuration entry which creates the configuration data. Then you can have
> a *different* piece of code that interprets and validates the configuration
> data. That's one of the absolute core features of high-quality software.
> 
> I'm not really visualizing what your system is, does, or how it works...so
> apologies if I'm totally off the mark.
> 
>> Does it work in compiled databases (although this one runs live without
> being compiled)?
> 
> No. Not in compiled mode. If you need that, FootRunner has long been the go
> but these days I guess that 4DCODE gets the nod. I haven't used either
> enough to comment more on them.

**
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: Dynamic Method Creation & Content Changing

2017-04-20 Thread truegold via 4D_Tech
Hi Charles,

> It does not work in compiled db. In uncompiled db why not rewrite method
> and replace same, no need to go though just making the adjustments
> 

Clearly that would be obvious right? 

Maybe I wasn’t clear enough. This isn’t for me it’s for an end user who makes 
these changes - albeit infrequently - and I’m looking for a way to make it 
easier.

At this time compiled is not an issue since the end user already accesses 
design to make small changes.

John…


**
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
**

SVG Best approach to add Image Margin

2017-04-01 Thread truegold via 4D_Tech
Hi All SVG Pro’s,

Background: I’m creating circular shaped images using SVG. Sometimes the images 
seem to get slightly cut off. Maybe because part of the stroke overlaps the 0 
point? Anyway, I decided I’d add a non-drawable margin around the image. Say 
around 4 pixels or so.

The only way I could get it to reliably work is to define both the viewbox and 
the viewport. Usually defining the viewport is enough.

So for example, if the viewport had a height and width of 600 pixels then…

svg_width:=600
svg_height:=600
$_offset:=4

SVG_SET_DIMENSIONS ($domSvg;$svg_width;$svg_height;"px”)

In order to get this to work without cutting off edges I had to set the viewbox 
as follows:

$viewbox_width:=$svg_width+($_offset*2) 
$viewbox_height:=$svg_height+($_offset*2) 

$viewbox_x:=-$_offset
$viewbox_y:=-$_offset
$viewbox_mode:="true"  // is same as xMinYMin

SVG_SET_VIEWBOX 
($domSvg;$viewbox_x;$viewbox_y;$viewbox_width;$viewbox_height;$viewbox_mode)

So to get this to work I had to subtract the offset from the view box x and y. 
And I had to add the offset multiplied by two to the view box width and height.

So my question is…

Is this the best way? Is this even correct?

I’m looking for the most reliable and effective approach to managing an svg 
image workspace.

Hope that makes sense?

Hope someone has had to deal with this issues!

Appreciate you all,
John…



**
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: SVG Text Width and Height

2017-03-28 Thread truegold via 4D_Tech
Hi All,

4D v15.2 Mac

Here is what I discovered. The issue I am having appears to be do to incorrect 
results from the following lines of a routine:

$Dom_Ref:=SVG_New 
$tDom_Text:=SVG_New_text 
($Dom_Ref;$text_t;$ptr_W->;$ptr_H->;$fontName;$fontSize;$fontStyle;$fontAlign)
$pic:=SVG_Export_to_picture ($tDom_Text)
SVG_CLEAR ($Dom_Ref)
PICTURE PROPERTIES($pic;$ptr_W->;$ptr_H->)

I am not getting accurate width nor height from this approach.

BUT I am getting very close numbers from:

hmFree_GetStringWidth

TEXT_WidthHeight_Get - Old Miyako code I found in the NUG that I wrapped (see 
code below).

I ran test code and here’s an example of the results I am getting:

$fontName:="Tahoma"
$fontStyle:=Plain
$fontAlign:=Align center
$display_t:="10"

hm_W = hmFree_GetStringWidth
svg_W = SVG_String_WidthHeight_Get
ut_W = TEXT_WidthHeight_Get

Sizehm_Wsvg_W   ut_W
7   8   4   8
8   9   5   9
9   10  5   10
10  11  6   11
11  12  7   13
12  13  7   14
13  14  8   15
14  15  8   16
15  16  9   17
16  17  9   18
17  19  10  19
18  20  10  20
19  21  11  21
20  22  11  22
21  23  12  23
22  24  13  25
23  25  13  26
24  26  14  27
25  27  14  28
26  28  15  29


Notice that “hm_W" and “ut_W" are very close, at most, off by a pixel. I’m 
guessing rounding maybe.

Thought this might help others who are trying to place text at a particular 
point in a chart and are maybe not seeing what they are expecting to see.

John…

--

C_TEXT($1;$2)
C_REAL($3)
C_TEXT($4;$5;$6)
C_POINTER($7;$8)
C_LONGINT($0)

If (Count parameters>7)

$content:=$1
$font_family:=$2
$font_size:=$3
$font_style:=$4  //  normal | italic | oblique | inherit
$font_weight:=$5  //  normal | bold | bolder | lighter | 100 | 200 | 300 | 400 
| 500 | 600 | 700 | 800 | 900 | inherit
$font_decoration:=$6  //  none | underline | overline | line-through | blink | 
inherit

C_LONGINT($width_l;$height_l;$baseline_l)
C_PICTURE($picture_px)

$svg:=DOM Create XML Ref("svg")
$text:=DOM Create XML 
element($svg;"text";"x";0;"y";$font_size;"font-family";$font_family;"font-size";$font_size;"font-weight";$font_weight;"font-style";$font_style;"text-decoration";$font_decoration)
DOM SET XML ELEMENT VALUE($text;$content)
SVG EXPORT TO PICTURE($svg;$picture_px)
PICTURE PROPERTIES($picture_px;$width_l;$height_l)

$7->:=$width_l
$8->:=$height_l+2

DOM SET XML ATTRIBUTE($text;"y";"0")
SVG EXPORT TO PICTURE($svg;$picture_px)
PICTURE PROPERTIES($picture_px;$width_l;$height_l)

$baseline_l:=$height_l+2

DOM CLOSE XML($svg)

$0:=$baseline_l

End if 


> Hey Miyako,
> 
> Further info from previous post...
> 
> The more I experiment the more I think the width of the text is not correct.
> 
> If I include these lines:
> 
> SVG_SET_ATTRIBUTES ($text_svgRef;"text-align";"center")
> SVG_SET_ATTRIBUTES ($text_svgRef;"display-align";"center”)
> 
> In a text string of “19˚” the 9 shows up approx. centered.
> 
> If I exclude these two lines then.
> 
> In a text string of “19˚” the 1 shows up approx. right aligned.
> 
> So I am baffled and there’s little 4D example sir using the TextArea and 
> modifying attributes. Of course I am reviewing the SVG spec and trying 
> properties from there. But…
> 
> So there’s something I don’t understand I think.
> 
> Appreciate,
> John...
> 
>> Hi Miyako,
>> 
>> So if I understand how to replace “text” with “TextArea”…
>> 
>> Here’s an existing code fragment with various height/width adjustments
>> 
>> $fontAlign_D:=Align center
>> 
>> $pnt_X:=$ctr_X+(($ctr_X*$radius)*Cos($Angle))
>> $pnt_Y:=$ctr_Y-(($ctr_Y*$radius)*Sin($Angle))
>> 
>> $display_t:=$Degree+”˚”   `  example: 16˚
>> 
>> In this example the X and Y of the point are:
>> 
>> inX_D=577
>> inY_D=276
>> 
>> SVG_String_WidthHeight_Get (display_t; ->$width;
>>  ->$height; 

Re: SVG Text Width and Height

2017-03-25 Thread truegold via 4D_Tech
Hi Miyako,

So if I understand how to replace “text” with “TextArea”…

Here’s an existing code fragment with various height/width adjustments

$fontAlign_D:=Align center

$pnt_X:=$ctr_X+(($ctr_X*$radius)*Cos($Angle))
$pnt_Y:=$ctr_Y-(($ctr_Y*$radius)*Sin($Angle))

$display_t:=$Degree+”˚”   `  example: 16˚

In this example the X and Y of the point are:

inX_D=577
inY_D=276

SVG_String_WidthHeight_Get (display_t; ->$width;
 ->$height; $fontName; $fontSize_D; $fontStyle_D; $fontAlign_D)

`  set new Y coord based upon returned height dimensions
$inY_D:=$inY_D-($height/2)

$text_svgRef:=SVG_New_text 
($domSvg_ptr->;$cuspDegree+"˚";$inX_D;$inY_D;$fontName;$fontSize_D;$fontStyle_D;$fontAlign_D)

The XML looks like:

16˚

Notice the Y value is changed to 282. This works pretty good!

--

When switched from SVG_New_text to SVG_New_textArea:

$display_t:=$Degree+”˚”   `  example: 22˚

In this example the X and Y of the point are:

inX_D=577
inY_D=276

$text_svgRef:=SVG_New_textArea 
($domSvg_ptr->;$display_t;$inX_D;$inY_D;$width;$height;$fontName;$fontSize_D;$fontStyle_D;$fontAlign_D)
SVG_SET_ATTRIBUTES ($text_svgRef;"display-align";"center")
SVG_SET_ATTRIBUTES ($text_svgRef;"text-align";"center”)

First issue I noticed was the degree symbol (˚) {ctrl+k} is missing.  Although 
the correct string is in the xml.

16˚

First notice that the Y value remains at 276???

I thought it must be an encoding issue. So I tried different characters and 
none of them are being displayed.

Then I thought what if the width or height is not large enough to allow it to 
display? By playing with the width I could see all the characters are there. 
BUT I cannot reliably get the text centered on the point.

So then I removed the following two lines:

SVG_SET_ATTRIBUTES ($text_svgRef;"display-align";"center")
SVG_SET_ATTRIBUTES ($text_svgRef;"text-align";"center”)

And the values are exactly the same. So this code has not affect therefore I 
must not be setting the attributes correctly.

Any idea as to what I am doing wrong?

Appreciate,
John...

> HI Miyako,
> 
> Thanks for the info.
> 
>> Ref: have you considered using  instead of ?
> 
> I haven’t but I will now. 
> 
> I’ll see if there’s a difference.
> 
> Thanks for tips.
> 
> John…
> 
> 
>> in general, it is best to instruct the rendering engine to decide how to 
>> align objects,
>> rather than to compute the exact coordinates yourself.
>> 
>> "text-anchor" (start, middle, end) should take care of horizontal align in 
>> ,
>> but vertical align is going to be difficult since 4D does not support 
>> "dominant-baseline" or "alignment-baseline".
>> if you decide to go down the "y" or "dy" route, well, I guess it's going to 
>> be an uphill struggle.
>> 
>> have you considered using  instead of ?
>> 
>> you have "display-align" (before, center, after) for vertical align and 
>> "text-align" (start, center, end) for horizontal align.
>> 
>> p.s.
>> 
>> I love how they say start/end, before/after instead of left/right (because 
>> of right to left scripts)
>> and decisively use middle instead of center with respect to the subject 
>> (align or anchor)...
> 

**
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: SVG Text Width and Height

2017-03-25 Thread truegold via 4D_Tech
HI Miyako,

Thanks for the info.

> Ref: have you considered using  instead of ?

I haven’t but I will now. 

I’ll see if there’s a difference.

Thanks for tips.

John…


> in general, it is best to instruct the rendering engine to decide how to 
> align objects,
> rather than to compute the exact coordinates yourself.
> 
> "text-anchor" (start, middle, end) should take care of horizontal align in 
> ,
> but vertical align is going to be difficult since 4D does not support 
> "dominant-baseline" or "alignment-baseline".
> if you decide to go down the "y" or "dy" route, well, I guess it's going to 
> be an uphill struggle.
> 
> have you considered using  instead of ?
> 
> you have "display-align" (before, center, after) for vertical align and 
> "text-align" (start, center, end) for horizontal align.
> 
> p.s.
> 
> I love how they say start/end, before/after instead of left/right (because of 
> right to left scripts)
> and decisively use middle instead of center with respect to the subject 
> (align or anchor)...

**
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: SVG Text Width and Height

2017-03-24 Thread truegold via 4D_Tech
Hi,

Ref: "could you not simply set text-anchor to middle?”

Do you mean:

$fontAlign_M:=Align center

If so then yes it is one of the parameters being sent into SVG_New_text command.

John...

> Hi All,
> 
> 4D v15.2 Mac/Win
> 
> I’m sure I’ve seen this recently but can’t find it (something about double 
> processing width/height). I recall reading but not quite understanding it. 
> What was it’s topic name? Anyway...
> 
> I am working on a project where I need to place short text strings exactly at 
> a various points within a circle. Easy enough using a little trig.
> 
> Even though my centering text on a point works, for the most part, I’m not 
> sure it’s exactly precise. I notice when changing the font and font size that 
> it’s off by a pixel or a few. And I can see it and it doesn’t look right to 
> me eyes.
> 
> So before I check my question:
> 
> Does anyone have routine that will reliably center an SVG text string on a 
> point? Here’s what I am using.
> 
> $Dom_Ref:=SVG_New 
> $tDom_Text:=SVG_New_text 
> ($Dom_Ref;$text_t;$ptr_W->;$ptr_H->;$fontName;$fontSize;$fontStyle;$fontAlign)
> $pic:=SVG_Export_to_picture ($tDom_Text)
> SVG_CLEAR ($Dom_Ref)
> 
> PICTURE PROPERTIES($pic;$ptr_W->;$ptr_H->)
> 
> Is this the best approach? Or is there a more precise algorithm like double 
> processing width/height?
> 
> Thanks,
> John...

**
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
**

SVG Text Width and Height

2017-03-24 Thread truegold via 4D_Tech
Hi All,

4D v15.2 Mac/Win

I’m sure I’ve seen this recently but can’t find it (something about double 
processing width/height). I recall reading but not quite understanding it. What 
was it’s topic name? Anyway...

I am working on a project where I need to place short text strings exactly at a 
various points within a circle. Easy enough using a little trig.

Even though my centering text on a point works, for the most part, I’m not sure 
it’s exactly precise. I notice when changing the font and font size that it’s 
off by a pixel or a few. And I can see it and it doesn’t look right to me eyes.

So before I check my question:

Does anyone have routine that will reliably center an SVG text string on a 
point? Here’s what I am using.

$Dom_Ref:=SVG_New 
$tDom_Text:=SVG_New_text 
($Dom_Ref;$text_t;$ptr_W->;$ptr_H->;$fontName;$fontSize;$fontStyle;$fontAlign)
$pic:=SVG_Export_to_picture ($tDom_Text)
SVG_CLEAR ($Dom_Ref)

PICTURE PROPERTIES($pic;$ptr_W->;$ptr_H->)

Is this the best approach? Or is there a more precise algorithm like double 
processing width/height?

Thanks,
John...
**
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: Larry Sharpe

2017-03-15 Thread truegold via 4D_Tech
Hi Lee,

Thanks for posting.

I last saw Larry in Portland, OR at a 4D Summit. He looked good. We had a good 
time of reminiscing.

I'm in shock!

RIP my friend,
John...

> Larry passed away last week.. Obit here:  
> http://www.mtdemocrat.com/obituaries/larry-sharpe/

**
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: Saved query files (.4df) and changes from v12 to v15 - automated conversion?

2017-03-06 Thread truegold via 4D_Tech
Hey Keith,

Our users have also found the new query dialog less intuitive. They expressed 
that having to use popup buttons required extra steps. And because some 
checkboxes are now hidden in the popup they forget about it. And other more 
subtle things.

So for them it’s extra work!

And, yes, I agree some things are more intuitive but I still prefer the 
“Classic” view myself.

So I have used Miyako's dialog and the clients are happier.

Not sure why 4D had to do away completely with a common editor that has been 
used for many years. Couldn’t the have offered both?

Anyway, my thoughts.
John...

> …
>> For a number of reasons we decided to shield our users from 4D’s new query 
>> dialog, which we find not intuitive…
> 
> That surprises me.
> We found the v15 4D search interface really easy to understand.
> I guess we must be used to very different interfaces.
> Cheers, Keith

**
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: Saved query files (.4df) and changes from v12 to v15 - automated conversion?

2017-03-06 Thread truegold via 4D_Tech
Hi Arnaud,

Funny, I just got asked about this on Friday.

I would also be interested to know the bets way to handle older (I think 
they’re all from v12) Query files.

Appreciate,
John...

>> Le 6 mars 2017 à 13:45, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> Miyako's dialog works quite well but has just one drawback: it can’t open 
>> .4DF files created with v12. [...] I was hoping to find a way to do this in 
>> a batch process programmatically. Our users have hundreds of .4DF files to 
>> convert…
>> 
>> Any suggestions?
> 
> I had some code to read 4df document that I began to adapt to v11 but gave 
> up. It could be a starter, if you don't find better. 
> 
> -- 
> 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
**

Re: Typeahead Component

2017-02-21 Thread truegold via 4D_Tech
Hi Olivier,

I have on my task list adding a type ahead lookup …

This sill save time!!!

Thank you,
John...

> I have written a component allowing easy implementation of typeahead 
> functions for variables or fields.
> 
> The idea is to create an array with possible values ("suggestions") and to 
> place a method (the only shared method of the component) in the on after edit 
> event of the variable or field. To this method, you pass the object name of 
> the variable or field and a pointer to the array with the values.
> 
> As soon as the user starts to type, the component displays a typeahead 
> dialog, a bit similar as the one we 4D programmers are used to work with when 
> writing code in the 4D method editor.
> 
> The component is free and open source, currently 4D v14 based but should be 
> easily portable to newer versions.
> 
> Download link:
> 
> https://www.asuswebstorage.com/navigate/s/E382754C0DCE455CB56D3BA121D8C474W
> 
> Best,
> 
> Olivier Flury

**
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: Windows Client Stops Working

2017-02-03 Thread truegold
Hi Don,

Ref: "Check your Resources folder for files with names unacceptable in windows, 
e.g., a date like 01/01/2016 in the file name - ok for macs but unacceptable in 
Windows.  In my case, the Resource file couldn’t be synchronized. “

Makes sense.

BUT…

I also ran Cannon’s “OBJ_Module” which has no resources and 4D stopped working 
as well.

In fact I tried three complexly different applications.

So I’m stumped!

Appreciate the help,
John…

> OSX 4D Server 32 bit 15.3
> Mixed OSX and Windows Clients also 15.3
> All plugins correspond to 15.3
> ALP is current ALP_9.9.3
> 
> The app has been working great on OSX and on OSX clients.
> 
> But I cannot get it to run with Windows 15.3 Client on either my local remote:
> 
> Desktop Windows 7 Ultimate
> 
> or
> 
> Laptop Windows 10 Home
> 
> So I need to understand how other developers would diagnose the issue?
> 
> In all cases I can see the server in the dialog (Available tab) and when I 
> click OK it will sometimes stop almost immediately or start copying over the 
> various resources and during that process.
> 
> The error message is:
> 
> 4D has stopped working
> 
> A problem caused the program to stop working correctly. …
> 
> I don’t think it’s a permissions issue since the older Windows 7 can log into 
> earlier 4D Servers.
> 
> It seems to be specific to 4D 15.
> 
> Has anyone else experienced issues via login remote (4D Client)?
> 
**
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
**

Windows Client Stops Working

2017-02-03 Thread truegold
Hi All,

I have tried to see if this issue has been covered in the KB or Nabble. But not 
very helpful.

OSX 4D Server 32 bit 15.3
Mixed OSX and Windows Clients also 15.3
All plugins correspond to 15.3
ALP is current ALP_9.9.3

The app has been working great on OSX and on OSX clients.

But I cannot get it to run with Windows 15.3 Client on either my local remote:

Desktop Windows 7 Ultimate

or

Laptop Windows 10 Home

So I need to understand how other developers would diagnose the issue?

In all cases I can see the server in the dialog (Available tab) and when I 
click OK it will sometimes stop almost immediately or start copying over the 
various resources and during that process.

The error message is:

4D has stopped working

A problem caused the program to stop working correctly. …

I don’t think it’s a permissions issue since the older Windows 7 can log into 
earlier 4D Servers.

It seems to be specific to 4D 15.

Has anyone else experienced issues via login remote (4D Client)?

Appreciate,
John...
**
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: Plugin IDE Issues

2017-01-25 Thread truegold
Hey John,

Oh yea. I had forgotten about that one. I took a look at my archive and the 
last message was Sep 20, 2015. Before that two around early May 2013.

But as it turns out Miyako had addressed an issue about old SDKs - which may or 
may not be an issue. That’s what I am trying to understand.

So thanks for the reminder as there’s some advice I need to look at there.

Appreciate,
John...


>> On Jan 23, 2017, at 9:29 PM, truegold <trueg...@isomedia.com> wrote:
>> 
>> Sorry there is little activity on the Plugin forum on the French site so I 
>> thought I’d ask here.
> 
> From: John DeSoi <de...@pgedit.com>
> Maybe try the plugin talk list (4d-plug...@info.4d.com). I realize no 
> messages for a while, but it seemed like in the past you could get a 
> response. Probably no one has unsubscribed, so they are more likely to see 
> your message than on a private forum where you have to login.

**
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
**

Plugin IDE Issues

2017-01-23 Thread truegold
Hi Miyako (or anyone),

Sorry there is little activity on the Plugin forum on the French site so I 
thought I’d ask here.

Whenever I open one of the source plugins ( in this case "Text Convert” 
generously made available - THANK YOU ) using Xcode (6.2) I seem to stumble out 
the gate because there’s usually a “1 target, missing base SDK” error.

So I know I need to set this because it needs to know which supported platforms 
it’s going to run on.

I’d like to get it to the point so that whenever I download a plugin source to 
study I can build and test without issue. [Not usually the case for me]

So how can I setup Xcode so that’s equipped for any plugin I might wish to 
explore and study. I’ll be building a plugin for 4D 15 and on.

Does that make sense?

Also are there any other developers who create plugins on a regular bases? I 
would like to connect with someone who might have time to bounce ideas off of 
and discuss challenges from time to time. Kind of help me out, more than 
likely, starting with getting past some of the basic challenges of a newbie.

Appreciate any feedback,
John...
**
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: Query editor in v15

2016-12-12 Thread truegold
Hey Miyako,

Again much thanks!

My client is s happy with the return of a classic search editor.

She could not get used to the new search editor!

Very much appreciate your ongoing efforts,
John...

> I've just added some caching code to speed up the display for large 
> structures,
> see notes under "New!" on 
> https://github.com/miyako/4d-component-classic-query-editor
> 
> hope it helps.
> 
>> 2016/12/09 20:52、Paul Lovejoy  のメール:
>> However, it takes about 10 seconds for the dialog to open.
>> I suppose it’s because we have about 220 tables and it’s taking the time to 
>> analyse the structure.
> 
**
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: Query editor in v15

2016-12-09 Thread truegold
HI Miyako,

> it could be optimised by some caching mechanism I guess...
> I could work on it if you really need it.

I second Paul’s request! And who told you that it was not needed outside of 
Japan?

My client absolutely HATES the new query editor.

Thank you for creating this component mirroring the look and feel of the 
classic query editor. This should go a long way to alleviating her stress.

Much appreciated,
John…
 

> 
> Le 9 déc. 2016 à 13:57, Keisuke Miyako  a écrit :
> 
> the editor follows all relations from all fields for any depth,
> not just "1" relations as in the classic editor,
> but also "n" relations too,
> since QUERY is optimised for n fields since v11.
> 
> it could be optimised by some caching mechanism I guess...
> I could work on it if you really need it. (I was told that there is little 
> need for it outside of Japan)

**
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: Scrollbars become disabled

2016-11-17 Thread truegold
Hi Chuck,

> If you are changing code to add redraw why not change window type and set max 
> and min sizes to be only a few pixels different

No code changing. Just adding a few refresh buttons at the moment to see if 
they make any difference.

As to changing window type we’ll see after I get some feedback from them.

Appreciate,
John...

>>> 
> Using 4D v15.2 Mac Server (mac and window clients)
> 
> We are having issues where the scrollbars in included forms and lisboxes
> become disabled even though there are plenty of rows beyond the screen
> display area. This has been happening on and off since 4D v12. So it’s not
> new.
> 
> Has anyone else seen this?
> 
> If so, what did you do to fix?
> 
> Of course, when debugging it it never happens.
> 
> Appreciate,
> 
>> 
> 

**
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: Scrollbars become disabled

2016-11-17 Thread truegold
Hey Chip,

> redraw   ?

Yea, that’s the only thing i can think of is providing various ways of 
refreshing the list OR refreshing the window.

Thanks,
John...

> Hi Chuck,
> 
>> Can you minimize and bring back. It may also work by clicking into where 
>> scroll bar is
> 
> 
> Unfortunately not. This an old database that started development in late 
> 80’s. It still has those small window with no animated abilities.
> 
> So I will try seeing if reloading the records for the included layouts help.
> 
> Not sure yet on the HList.
> 
> Just weird,
> John...
> 
>> Hi Chuck,
>> 
>>> Try resizing the window manually
>> 
>> Well, that would be easy to try except that almost all there windows are a 
>> fixed size and not resizable.
>> 
>> Thanks,
>> John...
>> 
 Using 4D v15.2 Mac Server (mac and window clients)
 
 We are having issues where the scrollbars in included forms and lisboxes
 become disabled even though there are plenty of rows beyond the screen
 display area. This has been happening on and off since 4D v12. So it’s not
 new.
 
 Has anyone else seen this?
 
 If so, what did you do to fix?
 
 Of course, when debugging it it never happens.
 
 Appreciate,
 
> 

**
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: Scrollbars become disabled

2016-11-16 Thread truegold
Hi Keith,

> Would it be related to the System Preferences:General:Show Scroll bars 
> setting?  

I can’t say for sure other than the full scrollbar is present.

I will check and see what there settings are.

Appreciate the idea,
John...

>> Hi All,
>> 
>> Using 4D v15.2 Mac Server (mac and window clients)
>> 
>> We are having issues where the scrollbars in included forms and lisboxes 
>> become disabled even though there are plenty of rows beyond the screen 
>> display area. This has been happening on and off since 4D v12. So it’s not 
>> new.
>> 
>> Has anyone else seen this?
>> 
>> If so, what did you do to fix?
>> 
>> Of course, when debugging it it never happens.
>> 
>> Appreciate,
>> John...
>> 
**
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: Scrollbars become disabled

2016-11-16 Thread truegold
Hi Chuck,

> Can you minimize and bring back. It may also work by clicking into where 
> scroll bar is


Unfortunately not. This an old database that started development in late 80’s. 
It still has those small window with no animated abilities.

So I will try seeing if reloading the records for the included layouts help.

Not sure yet on the HList.

Just weird,
John...

> Hi Chuck,
> 
>> Try resizing the window manually
> 
> Well, that would be easy to try except that almost all there windows are a 
> fixed size and not resizable.
> 
> Thanks,
> John...
> 
>>> Using 4D v15.2 Mac Server (mac and window clients)
>>> 
>>> We are having issues where the scrollbars in included forms and lisboxes
>>> become disabled even though there are plenty of rows beyond the screen
>>> display area. This has been happening on and off since 4D v12. So it’s not
>>> new.
>>> 
>>> Has anyone else seen this?
>>> 
>>> If so, what did you do to fix?
>>> 
>>> Of course, when debugging it it never happens.
>>> 
>>> Appreciate,
>>> 

**
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: OSX Window Sheets versus what to do on windows

2016-11-07 Thread truegold
Hi Miyako,

Yes that’s very slick!

I use web areas in other databases. And I will investigate this further for 
future projects. It’s amazing what css is evolving into.

For this project however I think I want something simpler that just looks 
similar on Mac and windows.

Maybe I shouldn’t ask about sheets versus and instead ask how others are 
handling dialogs in cross platform apps.

Which window types work best cross platform and are consistent with UI specs.

Thank you for the idea,
John...

> with a web-area based UI, 
> you could do all sorts of things... 
> 
> http://tympanus.net/codrops/2013/06/25/nifty-modal-window-effects/


**
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: How to determine Spacebar Depressed

2016-10-21 Thread truegold
Hi Jeremy,

Yes and I know how to do use that command. I was just describing my scenario I 
was attempting to implement. Setting the cursor is the easy part.

Appreciate,
John...

> Have you looked at the “SET CURSOR” command in v15?
> 
> http://doc.4d.com/4Dv15R5/4D/15-R5/SET-CURSOR.301-2937487.en.html 
> <http://doc.4d.com/4Dv15R5/4D/15-R5/SET-CURSOR.301-2937487.en.html>
> 
> 
>> On Oct 21, 2016, at 3:41 PM, truegold <trueg...@isomedia.com> wrote:
>> 
>> When the space bar is pressed I want the cursor to change to a little hand 
>> and then as I move the mouse the diagram moves (actually scrolls) around.
**
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: How to determine Spacebar Depressed

2016-10-21 Thread truegold
Hey Doug,

Yea, I’m already doing that using

: (Form event=On Mouse Move)

That part works and limits the firing to the “hot zone".

It amazes me that after 30 years I can’t know which key was pressed without, 
once I get it working, using an ‘On Event Call’.

When I thought about imitating the behavior it seemed so easy.

Ahh… Isn’t that what my client always say? 

Appreciate,
John...

> Get mouse to return the mouse location or, if you need the data only when 
> the mouse is over a specific object, you can use On mouse enter to enable 
> your event handler and then shut it off On mouse leave. If the object in 
> question doesn't respond to those events, you could either put a very large 
> button over the object or, if that won't work, create a "border fence" 
> around the object to capture the mouse enter and mouse exit. 
> 
> Once the mouse is in the hot zone, the event handler will monitor the event 
> queue and you can capture use of the spacebar using the event handler and 
> the Keystroke command. 
**
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: How to determine Spacebar Depressed

2016-10-21 Thread truegold
Hey Tim,

> Yes, that is how you would handle knowing if the space bar was pressed. Use 
> ON EVENT CALL. 


Well the challenge is that I need it to run all the time the mouse is over the 
digram. So maybe I’ll start with another key like Option and get it working 
before I go the “On event Call”’ route.

Appreciate,
John...

> > I can’t seem to find which 4D command, if any, returns that the spacebar is 
> > depressed? Or any key (other then above) for that matter? 
> > 
> > I’ve been trolling through the docs: 'User Interface' and found: 
> > 
> > Caps lock down 
> > Shift down 
> > Macintosh command down   
> > Macintosh control down   
> > Macintosh option down   
> > Windows Alt down   
> > Windows Ctrl down 
> > 
> > But other keys? Probably simple and I’m not seeing it? 
> > 
> > Maybe combination of KeyCode and On EVENT CALL?
> 
> Yes, that is how you would handle knowing if the space bar was pressed. Use 
> ON EVENT CALL. 
> 
> Tim 
**
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
**

How to determine Spacebar Depressed

2016-10-21 Thread truegold
Hi All,

I can’t seem to find which 4D command, if any, returns that the spacebar is 
depressed? Or any key (other then above) for that matter?

I’ve been trolling through the docs: 'User Interface' and found:

Caps lock down
Shift down
Macintosh command down  
Macintosh control down  
Macintosh option down  
Windows Alt down  
Windows Ctrl down

But other keys? Probably simple and I’m not seeing it?

Maybe combination of KeyCode and On EVENT CALL?

Anyone know?

Thanks,
John...

**
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: SVG Spacebar + Mouse down Diagram Navigator

2016-10-20 Thread truegold
Hey Keith (et al),

Hmmm “... TRANSFORM PICTURE …” hadn’t though about that.

(For posterity) Using 'Translate’ as the operator the docs say: The picture is 
moved by param1 pixels horizontally and by param2 pixels vertically. Pass a 
positive value to move to the right or towards the bottom and a negative value 
to move to the left or towards the top.

I’ll give it a go.

I’ve been trolling through the docs: 'User Interface' and found:

Caps lock down
Shift down
Macintosh command down  
Macintosh control down  
Macintosh option down  
Windows Alt down  
Windows Ctrl down

But I can’t seem to find which 4D command, if any, returns that the spacebar is 
depressed? Or any key (other then above) for that matter? Maybe KeyCode and On 
EVENT CALL? Maybe I’ll have to change character sequence?

Anything pop into your mind?

Appreciate,
John...

> Something like this in the picture object: 
> C_LONGINT($mx;$my;startX;startY) 
> GET MOUSE($mx;$my;$mb) 
> Case of 
> : (Form event=On Clicked) 
> startX:=$mx 
> startY:=$my 
> 
> : (Form event=On Mouse Move) 
> If ($mb=1) 
> PICTURE PROPERTIES(vPic;$pw;$ph) 
> OBJECT GET COORDINATES(*;"vPic";$l;$t;$r;$b) 
> $nw:=$r-$l 
> $nh:=$b-$t 
> TRANSFORM PICTURE(vPic;Translate;$mx-startX*($nw/$pw);$my-startY*($nh/$ph)) 
> startX:=$mx 
> startY:=$my 
> End if 
> End case 
> 
> 
>> Hey All,
>> 
>> So it looks like…
>> 
>> will need to manipulate various sets of coords:
>> 
>> 1. picture coords holding svg (need width and height)
>> 2. scroll position of each scrollbar (OBJECT GET SCROLL POSITION) 
>> 3. mouse coordinates of where I am in picture (GET MOUSE)
>> 4. relative coords inside svg image (so I know how much can be moved…)
>> 
>> A bit of work but doable. Anyone already done it?
>> 
>> Code snippets?
>> 
>> Thanks,
>> John...
>> 
>>> Hey Keith,
>>> 
>>> Ahh, as the doc says “... even the pixels of a picture”
>>> 
>>> This might work.
>>> 
>>> I’ll see if I can get it to work.
>>> 
>>> Appreciate,
>>> John...
>>> 
 I think the easiest option would be to use OBJECT SET SCROLL POSITION ( * 
 ; object {; vPosition {; hPosition}}{; *} ) once the picture has been 
 created.
>>> 
> Hi All,
> 
> 4D 15.2 (mac and windows).
> 
> I would like to implement a scrolling technique in an SVG picture 
> (diagram) on a form. Essentially I want to be able to move around my 
> digram by holding the space bar + mouse down. So as I move the mouse 
> around the the page it scrolls horizontal and vertically. I’d like to use 
> the “native” 4D SVG plugin commands.
> 
> Has anyone implemented?
> 
> Ideas? Code sample?
> 
> Thanks,
> John...
>>> 
>> 
> 
**
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: SVG Spacebar + Mouse down Diagram Navigator

2016-10-20 Thread truegold
Hey All,

So it looks like…

will need to manipulate various sets of coords:

1. picture coords holding svg (need width and height)
2. scroll position of each scrollbar (OBJECT GET SCROLL POSITION) 
3. mouse coordinates of where I am in picture (GET MOUSE)
4. relative coords inside svg image (so I know how much can be moved…)

A bit of work but doable. Anyone already done it?

Code snippets?

Thanks,
John...

> Hey Keith,
> 
> Ahh, as the doc says “... even the pixels of a picture”
> 
> This might work.
> 
> I’ll see if I can get it to work.
> 
> Appreciate,
> John...
> 
>> I think the easiest option would be to use OBJECT SET SCROLL POSITION ( * ; 
>> object {; vPosition {; hPosition}}{; *} ) once the picture has been created.
> 
>>> Hi All,
>>> 
>>> 4D 15.2 (mac and windows).
>>> 
>>> I would like to implement a scrolling technique in an SVG picture (diagram) 
>>> on a form. Essentially I want to be able to move around my digram by 
>>> holding the space bar + mouse down. So as I move the mouse around the the 
>>> page it scrolls horizontal and vertically. I’d like to use the “native” 4D 
>>> SVG plugin commands.
>>> 
>>> Has anyone implemented?
>>> 
>>> Ideas? Code sample?
>>> 
>>> Thanks,
>>> John...
> 

**
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: SVG Spacebar + Mouse down Diagram Navigator

2016-10-20 Thread truegold
Hey Keith,

Ahh, as the doc says “... even the pixels of a picture”

This might work.

I’ll see if I can get it to work.

Appreciate,
John...

> I think the easiest option would be to use OBJECT SET SCROLL POSITION ( * ; 
> object {; vPosition {; hPosition}}{; *} ) once the picture has been created.

>> Hi All,
>> 
>> 4D 15.2 (mac and windows).
>> 
>> I would like to implement a scrolling technique in an SVG picture (diagram) 
>> on a form. Essentially I want to be able to move around my digram by holding 
>> the space bar + mouse down. So as I move the mouse around the the page it 
>> scrolls horizontal and vertically. I’d like to use the “native” 4D SVG 
>> plugin commands.
>> 
>> Has anyone implemented?
>> 
>> Ideas? Code sample?
>> 
>> Thanks,
>> John...

**
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
**

SVG Spacebar + Mouse down Diagram Navigator

2016-10-20 Thread truegold
Hi All,

4D 15.2 (mac and windows).

I would like to implement a scrolling technique in an SVG picture (diagram) on 
a form. Essentially I want to be able to move around my digram by holding the 
space bar + mouse down. So as I move the mouse around the the page it scrolls 
horizontal and vertically. I’d like to use the “native” 4D SVG plugin commands.

Has anyone implemented?

Ideas? Code sample?

Thanks,
John...
**
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
**

Editing object arrays in dynamically built columns

2016-10-17 Thread truegold
Hey Wendell,

Glad it helped. I know how frustrating it was!

John...

> HI John.
> 
> I got stuck on this issue for a half day before seeing your response below. 
> Thanks for pointing it out.
> 
> Wendell Turner
> 
>> On 25 Sep 2016, at 22:43, truegold <trueg...@isomedia.com> wrote:
>> 
>> Hey All,
>> 
>> Never mind! I found it.
>> 
>> Need to make sure that the listbox property Entry->Focusable is clicked. 
>> Change the “Focusable” property in design and now the column is editable.
>> 
>> Ugggh! Spent 1/2 day diagnosing that.
>> 
>> John...
>> 
>>> In fact I have added another column that is just an array of text values 
>>> and I cannot change it into an edit mode either? So is there something 
>>> about having an object array in a listbox…?

**
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: Editing object arrays in dynamically built columns

2016-09-25 Thread truegold
Hey All,

Never mind! I found it.

Need to make sure that the listbox property Entry->Focusable is clicked. Change 
the “Focusable” property in design and now the column is editable.

Ugggh! Spent 1/2 day diagnosing that.

John...

> Hey All,
> 
> Using 4D v15r2 standalone Macintosh (Yes I have a license one 4D View (4D 
> View Pro is native 4D behavior)), read the docs, reviewed any and all 
> examples of listbox edit/enterable in Nabble...
> 
> I am using Object Arrays in list boxes (single selection mode) dynamically 
> built from a LB with zero columns.
> 
> Currently I am just playing with the examples in the docs under the section 
> “Using object arrays in columns (4D View Pro)”. Just placing the listbox on a 
> form and dynamically building them using the 4D sample code examples and 
> displays correctly.
> 
> The docs say that based upon the valueType 4D uses various default widgets 
> (probably where 4D View Pro comes in) i.e., "text" is displayed as a text 
> input widget, a "boolean" as a check box, and so on. The UI part appears to 
> work nicely. As for actual editing...
> 
> The drop downs, popups, Boolean are changeable in the Column (although I have 
> yet to work on code to make th changes back to the array). But, and this is 
> where I am looking for help, text and numeric values are not editable.
> 
> I have tried setting the column to be editable using OBJECT SET ENTERABLE and 
> EDIT ITEM and Option click, Option+.
> 
> For example:
> 
> EDIT ITEM(colVar_p->;row)
> 
> But neither seems to work.
> 
> I know the column pointer ‘colVar_p‘ is correct because if I use this code
> 
> OBJECT SET VISIBLE(colVar_p->;False)
> 
> It is in fact hidden.
> 
> And the variable ‘row’ has the correct cell number.
> 
> In fact I have added another column that is just an array of text values and 
> I cannot change it into an edit mode either? So is there something about 
> having an object array in a listbox...?
> 
> So I am missing something? Is there a command I need to set as I am building 
> it dynamically?
> 
> Does anyone else have any experience working with object arrays in list boxes?
> 
> Any tips or tricks necessary? And code examples specific to handling object 
> arrays in columns in list boxes?
> 
> Appreciate,
> John…
> 

**
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: Custom Widgets

2016-08-19 Thread truegold
Hi Ortwin,

> Hier is an example of a calenderwidget

Really nice work! Aesthetically pleasing and wonderfully simple and elegant.

> I would not use objects for that kind of purpose. Methods are all tied to the 
> objects themselves which is a mess

That was my understanding as you can only copy an object into the library and 
the object method attached. My first attempt was a component but I haven’t been 
able to figure out yet how to show the form in the host yet.

Good news is that I have a fully functional calendar already ready to go. 

> I'd create a component, which offers a projectform to the master-database. 
> Communication is by subform-var object and EXECUTE IN SUBFORM/CALL SUBFORM 
> CONTAINER


Yea I‘m using these commands for dynamically switching forms on the fly. Works 
really well! So I’ll investigate further.

Appreciate your guidance,
John...

> 
>> My goal is to create a few reusable calendar form objects. For example a 
>> more flexible calendar than the one 4D’s offers.
> 
> I would not use objects for that kind of purpose. Methods are all tied to the 
> objects themselves which is a mess. Instead of that, I'd create a component, 
> which offers a projectform to the master-database. Communication is by 
> subform-var object and EXECUTE IN SUBFORM/CALL SUBFORM CONTAINER
> 
> Hier is an example of a calenderwidget
> 
> here are some articles about subforms
> 

**
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
**