Re: Moving STR# resources from .RSR to XLIFF

2017-01-28 Thread Keisuke Miyako
4D Pops used to be included in the installer.
but since v16, you need to download them separately,
explained in the Release Note.

http://download.4d.com/Documents/Products_Documentation/LastVersions/Line_16/VIntl/4D_v16_0_ReleaseNotes.pdf
http://download.4d.com/Components/4Dv16/

this repo seems deprecated
http://sources.4d.com/trac/4d_4dpop

it is by design that you can't load a Host resource from a Component.
components are supposed to be self contained.
you should copy the resource to the Component's resource folder.

if it is a development tool,
you should pass the location of the RSR file explicitly.

c.f.

http://kb.4d.com/assetid=76783


宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

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

Moving STR# resources from .RSR to XLIFF

2017-01-28 Thread Steven Prins
Hello, All.

4D v13 on OS X 10.10.

Two questions:

How can I get *RESOURCE TYPE LIST* and *RESOURCE LIST* called in a method 
residing in a component to access the resources of the host from which the 
method is called?  

Can anyone provide sample code to automate extraction of old STR# resources 
from existing .RSR files and writing them to XLIFF files to be placed in 
Resource folders of DBs upgraded and updated from v13 to v15/16?

Background:  I am exploring upgrading and updating old DBs currently in v13 to 
v15/16.  One of the tasks I have encountered is replacing STR# resources 
previously residing in .RSR files to XLIFF files to be placed in the Resources 
folders of the updated Dbs.  Hopefully without having to update objects that 
reference them within the structure.  

I have created a small component to extract STR# resources from v13 DBs in 
order to write them into XLIFF files.  Its extraction method works fine when it 
resides within the structure of the DB to be extracted.  But when called from a 
component it comes up empty, apparently finding no resources in the component 
itself.  How do I direct the method in the component to extract the resources 
in the host when called from the host?  Any advise would be greatly appreciated.

Thus far my testing has been limited to extracting the STR# resources with the 
above commands, copying and pasting them to text files, and then using the 4D 
Pop XLIFF Component to create a new resource file that will preserve the 
resource structure of the old DB, i.e. not require rewriting references within 
the updated DB.  However, this entails copying and pasting each resource, one 
at a time.  

In his Tech Note on the subject (08-33) Jess Pina wrote:
All string list resources and text resources have been moved to XLIFF files. 
This can be done in a few ways: 1) Programmatically, meaning, extracting the 
old strings by using the String List to Array command and then using the 4D XML 
commands to create XLIFF files.  

I am not familiar with the XML commands of 4d, and giving the theme a once over 
it does not look like a trivial task to figure out how to automate the process 
programmatically as Jesse Pina suggests.  So any examples of such code would 
also be greatly appreciated.  

Also, can anyone provide currently active links to 4D Pop pages at 4D?  My old 
links, i.e. http://www.4d.com/products/4dpop.html 
 go to the 404 Error Page at 4D.com 
.  Have these components been deprecated?  Or rewritten for 
more recent versions?  

Thanks in advance for any help.

Best to all from cold and sunny Santa Fe.  I enjoy following your exchanges on 
the List and learn a lot from them.  Thanks,

Steven Prins
Santa Fe, NM

**
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: Parameter indirection question

2017-01-28 Thread Douglas von Roeder
On Sat, Jan 28, 2017 at 11:53 AM, Kirk Brooks  wrote:

> ​But that's obviously only useful when all the params after $2 are
> pointers. Is it the case (now) that param indirection only works on
> similarly typed params?​
>
> ​I didn't think indirection was limited like this.​
>

Kirk:

Yup, that's the behavior. The curly braces instruct the compiler to treat
parm $n and all subsequent parameters as being of the same type.

From the Compiler 2.5 docs:

"Parameter Indirection
4D Compiler manages the power and versatility of parameter indirection. In
interpreted mode, 4th Dimension gives you a free hand with numbers and data
types of parameters. You retain this freedom in compiled mode, provided you
do not introduce data type conflicts and that you do not use more
parameters than you passed in the calling procedure.
To prevent possible conflicts, parameters addressed by indirection must all
be of the same data type.
This indirection is best managed if you respect the following convention:
if only some of the parameters are addressed by indirection, those
parameters should be passed after the others.
Within the procedure, an indirection address is formatted: ${$i}, where $i
is a numeric variable. ${$i} is called a generic parameter."

--
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: LISTBOX INSERT COLUMN not getting data

2017-01-28 Thread Lee Hinde
Cool.  Thanks.

> On Jan 28, 2017, at 10:33 AM, John DeSoi  wrote:
> 
> Yes, you can declare a 2D array of each type and then just allocate listbox 
> columns as needed from the 2D arrays.
> 
> John DeSoi, Ph.D.
> 
> 
> 
>> On Jan 28, 2017, at 12:07 PM, Lee Hinde  wrote:
>> 
>> In my case I am flattening out c_objectc/fields. By definition I don’t know 
>> how many keys will be in whatever I’m finding. So I have to pre-declare my 
>> best guess + 10 to have them ready.
>> 
>> I think. There isn’t a way to do this in real time, is there?
> 

**
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: LISTBOX INSERT COLUMN not getting data

2017-01-28 Thread Arnaud de Montard

> Le 28 janv. 2017 à 19:07, Lee Hinde  a écrit :
> 
> In my case I am flattening out c_objectc/fields. By definition I don’t know 
> how many keys will be in whatever I’m finding. So I have to pre-declare my 
> best guess + 10 to have them ready.
> 
> I think. There isn’t a way to do this in real time, is there?

In that case I use 2d arrays of various types, one by field type. 

Let's say for example you have these fields: 1 alpha, 1 text, 1 real, 2 long. 
  array text($_a2t;2;0)  //1 alpha + 1 text
  array real($_a2r;1;0)  //1 real
  array long($_a2l;2;0)  //2 long

Schematically, for a given type of field, the code must add a column to the 
corresponding 2D array type, and set that column as the field target when 
you'll execute STA. Not the same situation, but same principle here:

- lines 45..50 = 2D arrays we may need
- lines 87..115 = add a column to the array of the wanted type 

-- 
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: LISTBOX INSERT COLUMN not getting data

2017-01-28 Thread John DeSoi
Yes, you can declare a 2D array of each type and then just allocate listbox 
columns as needed from the 2D arrays.

John DeSoi, Ph.D.



> On Jan 28, 2017, at 12:07 PM, Lee Hinde  wrote:
> 
> In my case I am flattening out c_objectc/fields. By definition I don’t know 
> how many keys will be in whatever I’m finding. So I have to pre-declare my 
> best guess + 10 to have them ready.
> 
> I think. There isn’t a way to do this in real time, is there?

**
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: LISTBOX INSERT COLUMN not getting data

2017-01-28 Thread Lee Hinde
In my case I am flattening out c_objectc/fields. By definition I don’t know how 
many keys will be in whatever I’m finding. So I have to pre-declare my best 
guess + 10 to have them ready.

I think. There isn’t a way to do this in real time, is there?


> On Jan 28, 2017, at 8:41 AM, Arnaud de Montard  wrote:
> 
> 
>> Le 28 janv. 2017 à 00:03, Kirk Brooks  a écrit :
>> 
>> I've settled on a 3 step methodology that works like this (which I was
>> tweaking just the other day):
>> 
>> 1) get the column var pointers from the Listbox get arrays command (wrapped
>> in ​Listbox_get_colVarArray​).
>> 2) declare the variable type of those columns.
>> 3) then populate the arrays​.[...]
> 
> I like that way, it sounds better than copy! I'll change my habits for my 
> next array listbox… 
> BTW, I use a wrapper for LISTBOX GET ARRAYS too:
> 
> I was tired to declare 6 or more arrays just to get one. 
> 
> I have a question about typing in step 2 and SELECTION TO ARRAY (STA) in step 
> 3: 
> • STA interpreted will type the target array according to the source field
> • STA compiled will strictly not accept "incompatible" source field and 
> target array (for example: STA(integerField;longintArray) throws an error)
> • using STA 1st in a local array, then COPY ARRAY to a pointer on a column 
> listbox, I never noticed the array type way different from the field
> This to say I'd be tempted by "JackSparrowing" step 2: remove. Do I miss 
> something? 
> 
> -- 
> Arnaud de Montard 
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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