[flext] Period in object class name?

Jamie Bullock jamie at jamiebullock.com
Mon Mar 31 16:10:12 UTC 2014


Hi Thomas,

Sorry if I'm being  a bit slow, but I don't see what problem this solves.

If I create a new-style Max package (essentially a folder with my object name containing an extensions folder containing my library) then it will work without the requirement for the mappings file you describe below. The user puts it in the Max 6 "packages" folder and then they can use "ml.mlp" or whatever just fine. This is really no different to requiring users to put the ml.mxo in their extensions folder.

The problem is that I don't want to require users to put anything in any special locations to load objects. If someone distributes their patch in a folder containing the external, it should "just work", and the only way I can see to achieve this with Max is to distribute individual objects rather than as a library.

Jamie

On 13 Mar 2014, at 09:25, Thomas Grill <gr at grrrr.org> wrote:

> I see... if you look into the xsample externals, they come with a text file that defines "object mappings", essentially a list of links form object names to a binary. See the file attached.
> Aliases are given in the form
> max objectfile xgroove~ xsample;
> meaning that an instantiation of the xgroove~ object actually calls the xsample binary (library).
> gr~~~
> 
> 
> 2014-03-13 10:18 GMT+01:00 Jamie Bullock <jamie at jamiebullock.com>:
> 
> Hi Thomas,
> 
> Thanks for the reply. Can you elaborate a bit on this? "The distributed library can come as a new-style Max package with alias definitions for the individual objects, so that this becomes totally transparent to the user."
> 
> This sounds promising, but I'm not familiar the aliasing method you mention.
> 
> Thanks,
> 
> Jamie
> 
> On 13 Mar 2014, at 09:14, Thomas Grill <gr at grrrr.org> wrote:
> 
>> Hi Jamie,
>> the reason for the limitation is that Pd does support names with "special" characters only with an HTML-like encoding of the filename. (e.g. %2c for a dot) To support this, a quite different approach to the definition of the names would be required in flext.
>> I am totally convinced why a lib should be a problem. The distributed external library can come as a new-style Max package with alias definitions for the individual objects, so that this becomes totally transparent to the user.
>> gr~~~
>> 
>> 
>> 
>> 2014-03-13 10:05 GMT+01:00 Jamie Bullock <jamie at jamiebullock.com>:
>> 
>> Hi Thomas,
>> 
>> Sorry to come back on this one, but my client is unhappy about distributing a library of externals in "lib" form. The reason is that in Max, users are very unfamiliar with the "lib" concept and almost all libraries are distributed as a set of individual externals. It seems a bit ugly to move to an ml_* prefix instead of ml.* just because Flext doesn't support having a period in the class name for objects.
>> 
>> Do you think it would take much work to change this behaviour in Flext so that "." is supported in regular object names? I'd be happy to take a stab at this if you could give me some pointers as to where to start.
>> 
>> Jamie
>> 
>> 
>> On 18 Nov 2013, at 19:54, Thomas Grill <gr at grrrr.org> wrote:
>> 
>>> Interesting problem - i have made a couple of externals with a dot, but they are all part of external libraries, which bundle a few objects, see e.g. vasp, zconf, clk, etc. .
>>> I guess special characters (all except [a-z0-9_]) in main external objects are not supported at this point.
>>> gr~~~
>>> 
>>> 
>>> 2013/11/18 Jamie Bullock <jamie at jamiebullock.com>
>>> 
>>> Hi list,
>>> 
>>> I'd like to include a period in a Flext external name, e.g. ml.libsvm
>>> 
>>> I can achieve this in Max by renaming the target to "ml.libsvm" and adding FLEXT_NEW_V("ml.libsvm", svm)
>>> 
>>> However, if I try to load the resulting Pd object, I get the following error to the Pd console: load_object: Symbol "setup_ml0x2elibsvm" not found.
>>> 
>>> Is there a way to resolve this issue?
>>> 
>>> Thanks,
>>> 
>>> Jamie
>>> 
>>> 
>>> _______________________________________________
>>> http://grrrr.org/ext/flext
>>> 
>>> flext mailing list
>>> flext at grrrr.org
>>> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>>> 
>>> 
>>> 
>>> -- 
>>> Thomas Grill
>>> http://grrrr.org
>> 
>> 
>> 
>> 
>> -- 
>> Thomas Grill
>> http://grrrr.org
> 
> 
> 
> 
> -- 
> Thomas Grill
> http://grrrr.org
> <xsample-objectmappings.txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20140331/f4b84b24/attachment.html>


More information about the flext mailing list