RPTools.net

Discussion and Support

Skip to content

It is currently Fri Nov 17, 2017 2:19 pm 




Forum rules


Posting now open to all registered forum users.



Reply to topic  [ 9 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: [FREQ] I need a json version of Input()
PostPosted: Thu Jul 28, 2016 3:10 am 
It would be useful if there was another input function that took fields as parameters or took a json object or array of objects.

Code:
input(prop,value,prompt,type,options)
input(json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"))
input(json.append("",
   
json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"),
   
json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"))


Having an input like this will allow to use special characters that will mess with the parsing of the string to get the input properties.

There could even be a short hand version just using an array where the properties are determined by position.

Code:
input(json.append("","varName",0,"Enter Value","Text","value=string"))
input(json.append("",
   
json.append("","varName",0,"Enter Value","Text","value=string"),
   
json.append("","varName",0,"Enter Value","Text","value=string")


Although, you could probably do detection based the data to determine the method I suggest a whole new function like "json.input".

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
TheBard
 
Joined: Tue Mar 21, 2006 7:26 pm
Posts: 3483
Location: Austin, Tx
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Fri Jul 29, 2016 10:19 am 
I support this. The input function is valuable and may get a facelift with JavaFX. The current input works well but the string manipulation is sometimes pretty onerous.

_________________
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Fri Jul 29, 2016 10:30 am 
aliasmask wrote:
Code:
input(prop,value,prompt,type,options)
input(json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"))
input(json.append("",
   json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"),
   json.set("{}","prop","varName","value",0,"prompt","Enter Value","type","text","options","value=string"))
)
 


Given the option with just using the array method, I would probably never use the input with 5 parameters or the json object method. So, if it makes someone's life easier just doing the below method is all I'm looking for.

Code:
input(json.append("","varName",0,"Enter Value","Text","value=string"))
input(json.append("",
   json.append("","varName",0,"Enter Value","Text","value=string"),
   json.append("","varName",0,"Enter Value","Text","value=string")
)
  


Also, for the LIST type, accepting another json array would be ideal as well. I would like for PROPS to accept a json object. It would also be nice if it can return it as json object. Perhaps by adding it to the PROPS options or just make a new type for JSON. PROPS has a set field width and it would be nice if that can be adjusted in the options as it is done with the TEXT option. The TEXT option when blank should display and return an empty string rather than 0 (really big pet peeve).

I really don't like the way images are handled with Input(). I say just let the HTML handle it rather than plucking it from the string. We wouldn't need the size option either. When an image is in the value position, you can't have any alt text on the image because the prompt field suppresses it, even if you don't use the span option.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Tue Oct 11, 2016 6:42 pm 
As it turns out, there is already code that does some of this including some extra stuff: viewtopic.php?f=60&t=22577

Any chance of implementing this?

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1704
Location: Chicagoland
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Wed Oct 12, 2016 4:02 am 
The code is MIA, unless Az has an archived copy. In any case, it's probably vapor-ware.

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Wed Oct 12, 2016 4:49 am 
JamzTheMan wrote:
The code is MIA, unless Az has an archived copy. In any case, it's probably vapor-ware.

Well, Lee is the lead programmer for the MOTE team and they have input() working with jsons. Looks like their revving up for the final 1.6 release once they figure out an issue with OS X. Hopefully, they'll share their code at that point.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1704
Location: Chicagoland
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Thu Oct 13, 2016 1:55 pm 
Don't hold your breath (we're not).

I saw Az asked for it last month per GPL and they claim Apache 2.0 license and will release it when MOTE is "established". They want to make sure that we just don't integrate all their "cool stuff" and people just move back to MapTool or some other build I guess.


Aside from that, unless it's a quick hit, we have a few other things we're trying to get out the door first. And FX is one of those which may open a lot more doors with better HTML integration...

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3773
Location: MD
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Fri Oct 14, 2016 4:27 am 
JamzTheMan wrote:
I saw Az asked for it last month per GPL and they claim Apache 2.0 license and will release it when MOTE is "established". They want to make sure that we just don't integrate all their "cool stuff" and people just move back to MapTool or some other build I guess.

I'm sure this is in the back of their mind since they failed to significantly migrate users from Maptool to Mote, but it seems like their answer to that was to re-position Mote as a gateway to their commercial VTT ("Sift") via their "Sandstorm VTT Cloud Services"... and hope that Mote users would, eventually, choose to migrate to Sift.

What they *should* do is release the source for Mote (as they said they would) and encourage a merging of Maptool and Mote with ONE expectation: Continued Sandstorm support/integration.

If Sandstorm support could be integrated in a non-invasive and optional way (i.e. it's not skimming user data and has no dependencies or security risks when not being used) I don't see why the MT community would fight the option. There are users that would like to have cloud service support... and if the integration was somewhat policed by MT developers and its open-source bloodline then I think there would be little resistance. This would free the Mote guys up to focus their efforts on Sandstorm, Sift, and maintaining the Sandstorm bridge to MT.

Otherwise, Mote on it's own will remain a fringe, poorly adopted VTT, despite having some desirable features.

Walling off Mote from the MT community and failing to open-source it (as promised) has only alienated much of the MT user base. But I don't think it has to be an unsalvageable position.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1704
Location: Chicagoland
 Post subject: Re: [FREQ] I need a json version of Input()
PostPosted: Fri Oct 14, 2016 5:07 pm 
I agree with most of that, but in reality it's not even worth discussing. There is 0 interest from the MOTE team to work with the MapTool team in any capacity.

It's two completely different mindsets obviously. Theirs is to own IP and protect it and make money, ours is open source for community use for anyone to contribute to.

Back on topic. A stronger input() macro function would be nice and we'll keep an eye on it, but we may have other/better alternatives in the coming future.

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 9 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman