I am trying to set the value of the lastViewedByMeDate parameter for a file on Google drive. Setting request goes fine. When I retrieve the value of the property it is offset (delayed) from the time I set it to.
Referring to the page: https://developers.google.com/drive/v2/reference/files/update I tried this by setting the parameter updateViewedDate to false also. Setting it to false reduces the delay to like 3 seconds but it is still not what I set it to.
Is there something I am not doing right? Any help would be appreciated.
Related
I’ve written a small editor plugin that lets you directly edit EditCondition & EditConditionHides property metadata entries right from the editor. At first glance this seems to working - manually checking the properties metadata array, I can see the values updating and saving as expected.
However, the editor doesn’t seem to be evaluating the edit condition when values change. For example, using my custom editor to set the following condition:
Gives me the following results when changing values in the editor (in this case an editor for a custom data asset):
Notice the second example, the “Duration” field should now be enabled an editable, but it stays disabled. Am I missing something here? From what I understand adding an EditCondition to the properties metadata (i.e. meta=(EditCondition="Type == E_BuffType::Duration")) should be enough get the editor to update the way I’m expecting.
I'm using REST API as a datasource and not sure how to manually set a value in the Dropdown widget
The widget datasource is set to Client options are set to #datasource.items. The "display field" is name.
I'm running a script after the widget/data is loaded, I'm able to get all the options as an array and find the one that needs to be selected, but can't set the value to the widget.
What I tried is widget.values = widget.options[<index>] but it seems to always select the first option, no matter what the index is.
Try selecting a item in the datasource:
widget.datasource.selectIndex(/*INDEX HERE*/);
I have received data from json web service with RESTRequest component
but I do not know how I should display the returned data in a grid?
How can I use RESTResponseDataSetAdapter to improve this?
Try this - it took me about 15 minutes to get working
Open the RESTDemos in your Delphi install's Samples\Object Pascal\Database\RESTDemo
Drop a TStringGrid on the RHS of the the Delphi-Praxis tab (I chose this one because
the URI on the Fetch to DataSet produces a 404 error).
If necessary, make the non-visual controls on the form visible.
Dbl-click BindingList and use the QuickBindings to add a LinkGridToDataSource. Set its
DataSource to ClientDataSet and its GridControl to StringGrid1. Thus will cause DBSourceDB1 to be created'.
Set the Response property of RestReponseDataSetAdaptor to `RESTResponse'.
Compile, run and click the fetch list of forums button. You should see the StringGrid populates
from the contents of memo_ResponseData
That should show you that LiveBindings can work with a RESTReponse to populate a grid. The RESTDemos demo has a lot more things in it, but if this is your first experience of LiveBindings, you might want to backtrack and try setting up a simple test project which populates a TStringGrid and a few TEdits from a dataset of your own.
The config api within Trac is a pretty straight forward way of storing and loading settings from the config file. However, I haven't yet found a method to delete a line, or to delete all lines from a category that have no value assigned. So far I can only set the values to False or an empty string to deactivate them.
What I want to do is remove all values from my plugin's category that were set manually in the file and are not accepted by my script, or were set to False or no value by the script. In both ways, the whole line should be removed from the config so that it doesn't contain a lot of lines that look like this:
some_setting =
Edit
I just found out that I can assign None as value, which comments the setting, and the next time Trac writes to the config file it removes the commented line. This is a possible workaround, but I'm still interested in whether a direct method exists.
You can use Configuration.remove(...). Within a Component class call self.config.remove('section', 'key').
I downloaded this project:
http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm
To se how to save waypoints, I opened, the html, and tryied to save the waypoint, but it don't work, I dont know if i need to do something in SQL or not, I just tryied to make it works, please help me if you had sucess to make it works.
You have to:
create a DB with the name mapdir
create a table with the name mapdir inside this DB, the table should have only 1 field named value with the type text (there is a file mapdir.sql inside the ZIP-file, you may use it to create the table)
inside process.php you must edit line#5 and set the correct values for mysql_connect(servername,username,password)
You also should change process.php,Line#3 to
#$data = $_REQUEST['mapdata'];
....otherwise you later will not be able to load the waypoints when error_reporting is on.
But however, I wouldn't suggest to use this project like it is, there isn't any protection against SQL-injection.