Pictogram 1.6, Beta 6. Trabajando en bug Andres Ruiz Garcia.Tablero con categorias

parent 8e884dfe
...@@ -63,7 +63,7 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -63,7 +63,7 @@ public class Vocabulary implements Iterable<Picto> {
VocabularyTalk.iVocabularyListener vocabulary_listeners[] = {new VocabularyTalk.iVocabularyListener() { VocabularyTalk.iVocabularyListener vocabulary_listeners[] = {new VocabularyTalk.iVocabularyListener() {
@Override @Override
public void change(action action, int picto_grid, int picto_id, int id_child_grid, JSONObject args) { public void change(action action, int picto_grid, int picto_id, int id_child_grid, JSONObject args) {
Log.e(LOG_TAG, "****************************Picto HERE>>>>>>"+action);
switch (action) { switch (action) {
case delete: { case delete: {
Log.i(LOG_TAG, "Picto delete "+picto_grid+"."+picto_id); Log.i(LOG_TAG, "Picto delete "+picto_grid+"."+picto_id);
...@@ -72,7 +72,7 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -72,7 +72,7 @@ public class Vocabulary implements Iterable<Picto> {
} }
case update:{ case update:{
Log.i(LOG_TAG, "Picto update "+args.toString()); Log.i(LOG_TAG, "************************Vocabulary action listened (vocabulary model): " + action);
try { try {
modifyAttsPicto(picto_grid, picto_id, args.getJSONObject("attributes"), id_child_grid); modifyAttsPicto(picto_grid, picto_id, args.getJSONObject("attributes"), id_child_grid);
} catch (JSONException e) { } catch (JSONException e) {
...@@ -157,7 +157,10 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -157,7 +157,10 @@ public class Vocabulary implements Iterable<Picto> {
int index=-1; int index=-1;
if (pictos_cat!=null) if (pictos_cat!=null)
for (int i=0; i<pictos_cat.size() && index==-1; i++) for (int i=0; i<pictos_cat.size() && index==-1; i++)
if (pictos_cat.get(i).get_ImgId()==pic_id) index=i; if (pictos_cat.get(i).get_ImgId()==pic_id) {
index=i;
Log.e(LOG_TAG,"FOUNDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"+pic_id+"..."+grid_id+"..."+pic_id);
}
return index; return index;
} }
...@@ -240,6 +243,8 @@ public class Vocabulary implements Iterable<Picto> { ...@@ -240,6 +243,8 @@ public class Vocabulary implements Iterable<Picto> {
} }
else else
Log.i(this.getClass().getCanonicalName(),"Trying to modify an unregistered picto:"+pic_id+" grid:"+pic_grid); Log.i(this.getClass().getCanonicalName(),"Trying to modify an unregistered picto:"+pic_id+" grid:"+pic_grid);
Picto p=find_picto(pic_grid,0,0);
Log.e("LOG_TAG","**********o,o"+p.toString()+" ACTIVE GRID:"+PCBcontext.getPcbdb().getCurrentUser().get_active_grid());
} }
/** /**
......
...@@ -612,7 +612,7 @@ Log.e(LOG_TAG,"**********************************************************PICTO L ...@@ -612,7 +612,7 @@ Log.e(LOG_TAG,"**********************************************************PICTO L
*/ */
@Override @Override
public void change(action action, int picto_cat, int picto_id, int id_child_grid, JSONObject args) { public void change(action action, int picto_cat, int picto_id, int id_child_grid, JSONObject args) {
Log.i(LOG_TAG, "Vocabulary action listened: " + action); Log.i(LOG_TAG, "************************Vocabulary action listened (interface): " + action);
if (args != null) Log.d(LOG_TAG, "args: " + args.toString()); if (args != null) Log.d(LOG_TAG, "args: " + args.toString());
refresh(); refresh();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment